diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3161eb8e..9ff150c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,9 +26,9 @@ jobs: github.repository == 'stainless-sdks/orb-ruby' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0 with: bundler-cache: false - run: |- @@ -39,7 +39,7 @@ jobs: github.repository == 'stainless-sdks/orb-ruby' && !startsWith(github.ref, 'refs/heads/stl/') id: github-oidc - uses: actions/github-script@v8 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 with: script: core.setOutput('github_token', await core.getIDToken()); @@ -60,9 +60,9 @@ jobs: if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0 with: bundler-cache: false - run: |- @@ -76,9 +76,9 @@ jobs: runs-on: ${{ github.repository == 'stainless-sdks/orb-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0 with: bundler-cache: false - run: |- diff --git a/.github/workflows/publish-gem.yml b/.github/workflows/publish-gem.yml index 85ed01fb..6691ae1c 100644 --- a/.github/workflows/publish-gem.yml +++ b/.github/workflows/publish-gem.yml @@ -14,9 +14,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0 with: bundler-cache: false - run: |- diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 70087b2b..0cae5f9b 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -12,7 +12,7 @@ jobs: if: github.repository == 'orbcorp/orb-ruby' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Check release environment run: | diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e72f1131..7ccfe12c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.14.0" + ".": "1.15.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 9eac7077..f3bbb69b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 139 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-91a51960dab258d5435cc2a7f47760fd81e4b711b891a1fde3d98757e85e8add.yml -openapi_spec_hash: 192e4e94264db429260169f0b2e731ce +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb/orb-45297c0f1067cd444a30371110c69f876accf55f303a3dce9a4f74863b59f18f.yml +openapi_spec_hash: cd2f638b98c6e89342397fef860166b7 config_hash: c01c1191b1cd696c7ca855ff6d28a8df diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d804c26..6da249b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,37 @@ # Changelog +## 1.15.0 (2026-05-22) + +Full Changelog: [v1.14.0...v1.15.0](https://github.com/orbcorp/orb-ruby/compare/v1.14.0...v1.15.0) + +### Features + +* **api:** api update ([0738a02](https://github.com/orbcorp/orb-ruby/commit/0738a025b24db964db277bb3db1f6726308b1982)) +* **api:** api update ([b4e2776](https://github.com/orbcorp/orb-ruby/commit/b4e2776acd7d8f16e4638ffae48252fe359965b6)) +* **api:** api update ([4fa4367](https://github.com/orbcorp/orb-ruby/commit/4fa43675278ba33b0a666c2cc89ee1a3d1db756f)) +* **api:** api update ([6f796af](https://github.com/orbcorp/orb-ruby/commit/6f796af8274ac07b0212a71aa7f4514b202e094b)) +* **api:** api update ([5f0254d](https://github.com/orbcorp/orb-ruby/commit/5f0254dff5af51dd7a0b1302adc3a7c8db209011)) +* **api:** api update ([ebd342e](https://github.com/orbcorp/orb-ruby/commit/ebd342e9f511341c93ab4e57f7b92420d0677aa2)) +* **api:** api update ([2a2a137](https://github.com/orbcorp/orb-ruby/commit/2a2a137ad0d25853629c6de454472078d10a7cb3)) +* **api:** api update ([57f4509](https://github.com/orbcorp/orb-ruby/commit/57f4509e2c1e6e25913e713a33246805b8ae6474)) +* **api:** api update ([745a900](https://github.com/orbcorp/orb-ruby/commit/745a900f984941c1c00951c020a74007639e18da)) +* **api:** api update ([bd3d312](https://github.com/orbcorp/orb-ruby/commit/bd3d31208c279ea4d20a796494d307cad588f984)) +* **api:** api update ([abb683a](https://github.com/orbcorp/orb-ruby/commit/abb683ad449e5f3c44d72e829ed8df261d5a8e62)) +* **api:** api update ([bc1c5ce](https://github.com/orbcorp/orb-ruby/commit/bc1c5ceda19f8f2ee9a9459b9ac07f5cb1412b8b)) +* **api:** api update ([160ea66](https://github.com/orbcorp/orb-ruby/commit/160ea66268e7608fec8a56defecb8629538e0291)) +* support setting headers via env ([98a1cef](https://github.com/orbcorp/orb-ruby/commit/98a1cef742a7169b8b481020369e2dcd1f4c3493)) + + +### Bug Fixes + +* **client:** elide content type header on requests without body ([8c2ddbb](https://github.com/orbcorp/orb-ruby/commit/8c2ddbb632b0fa247e4819c27d7f4e5078e90bff)) + + +### Chores + +* **internal:** more robust bootstrap script ([2430669](https://github.com/orbcorp/orb-ruby/commit/2430669ed45de80ddfc9f6bada96725a6de44463)) +* **tests:** bump steady to v0.22.1 ([70eb623](https://github.com/orbcorp/orb-ruby/commit/70eb623e0694da153355a061b4bc059f3023f063)) + ## 1.14.0 (2026-04-13) Full Changelog: [v1.13.0...v1.14.0](https://github.com/orbcorp/orb-ruby/compare/v1.13.0...v1.14.0) diff --git a/Gemfile.lock b/Gemfile.lock index ef39b901..e4bdecc3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - orb-billing (1.14.0) + orb-billing (1.15.0) cgi connection_pool diff --git a/README.md b/README.md index e7212529..dc5c39c2 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "orb-billing", "~> 1.14.0" +gem "orb-billing", "~> 1.15.0" ``` diff --git a/lib/orb/client.rb b/lib/orb/client.rb index 24bd8b72..7d061b4e 100644 --- a/lib/orb/client.rb +++ b/lib/orb/client.rb @@ -193,6 +193,19 @@ def initialize( raise ArgumentError.new("api_key is required, and can be set via environ: \"ORB_API_KEY\"") end + headers = {} + custom_headers_env = ENV["ORB_CUSTOM_HEADERS"] + unless custom_headers_env.nil? + parsed = {} + custom_headers_env.split("\n").each do |line| + colon = line.index(":") + unless colon.nil? + parsed[line[0...colon].strip] = line[(colon + 1)..].strip + end + end + headers = parsed.merge(headers) + end + @api_key = api_key.to_s @webhook_secret = webhook_secret&.to_s @@ -202,6 +215,7 @@ def initialize( max_retries: max_retries, initial_retry_delay: initial_retry_delay, max_retry_delay: max_retry_delay, + headers: headers, idempotency_header: idempotency_header ) diff --git a/lib/orb/internal/transport/base_client.rb b/lib/orb/internal/transport/base_client.rb index c9370586..de4945d6 100644 --- a/lib/orb/internal/transport/base_client.rb +++ b/lib/orb/internal/transport/base_client.rb @@ -306,6 +306,8 @@ def initialize( Orb::Internal::Util.deep_merge(*[req[:body], opts[:extra_body]].compact) end + headers.delete("content-type") if body.nil? + url = Orb::Internal::Util.join_parsed_uri(@base_url_components, {**req, path: path, query: query}) headers, encoded = Orb::Internal::Util.encode_content(headers, body) { diff --git a/lib/orb/models/accounting_provider_config.rb b/lib/orb/models/accounting_provider_config.rb index fe2b7ed0..9b74c347 100644 --- a/lib/orb/models/accounting_provider_config.rb +++ b/lib/orb/models/accounting_provider_config.rb @@ -10,12 +10,23 @@ class AccountingProviderConfig < Orb::Internal::Type::BaseModel # @!attribute provider_type # - # @return [String] - required :provider_type, String + # @return [Symbol, Orb::Models::AccountingProviderConfig::ProviderType] + required :provider_type, enum: -> { Orb::AccountingProviderConfig::ProviderType } # @!method initialize(external_provider_id:, provider_type:) # @param external_provider_id [String] - # @param provider_type [String] + # @param provider_type [Symbol, Orb::Models::AccountingProviderConfig::ProviderType] + + # @see Orb::Models::AccountingProviderConfig#provider_type + module ProviderType + extend Orb::Internal::Type::Enum + + QUICKBOOKS = :quickbooks + NETSUITE = :netsuite + + # @!method self.values + # @return [Array] + end end end end diff --git a/lib/orb/models/alert.rb b/lib/orb/models/alert.rb index ea017f37..01ca7bb0 100644 --- a/lib/orb/models/alert.rb +++ b/lib/orb/models/alert.rb @@ -87,7 +87,23 @@ class Alert < Orb::Internal::Type::BaseModel # @return [Orb::Models::Alert::LicenseType, nil] optional :license_type, -> { Orb::Alert::LicenseType }, nil?: true - # @!method initialize(id:, created_at:, currency:, customer:, enabled:, metric:, plan:, subscription:, thresholds:, type:, balance_alert_status: nil, grouping_keys: nil, license_type: nil) + # @!attribute price_filters + # Filters scoping which prices are included in grouped cost alert evaluation. + # + # @return [Array, nil] + optional :price_filters, -> { Orb::Internal::Type::ArrayOf[Orb::Alert::PriceFilter] }, nil?: true + + # @!attribute threshold_overrides + # Per-group threshold overrides. Each override maps a specific combination of + # grouping_keys values to a replacement threshold list. Only present for grouped + # cost alerts that have at least one override. + # + # @return [Array, nil] + optional :threshold_overrides, + -> { Orb::Internal::Type::ArrayOf[Orb::Alert::ThresholdOverride] }, + nil?: true + + # @!method initialize(id:, created_at:, currency:, customer:, enabled:, metric:, plan:, subscription:, thresholds:, type:, balance_alert_status: nil, grouping_keys: nil, license_type: nil, price_filters: nil, threshold_overrides: nil) # Some parameter documentations has been truncated, see {Orb::Models::Alert} for # more details. # @@ -122,6 +138,10 @@ class Alert < Orb::Internal::Type::BaseModel # @param grouping_keys [Array, nil] The property keys to group cost alerts by. Only present for cost alerts with gro # # @param license_type [Orb::Models::Alert::LicenseType, nil] Minified license type for alert serialization. + # + # @param price_filters [Array, nil] Filters scoping which prices are included in grouped cost alert evaluation. + # + # @param threshold_overrides [Array, nil] Per-group threshold overrides. Each override maps a specific combination of grou # @see Orb::Models::Alert#metric class Metric < Orb::Internal::Type::BaseModel @@ -226,6 +246,90 @@ class LicenseType < Orb::Internal::Type::BaseModel # # @param id [String] end + + class PriceFilter < Orb::Internal::Type::BaseModel + # @!attribute field + # The property of the price to filter on. + # + # @return [Symbol, Orb::Models::Alert::PriceFilter::Field] + required :field, enum: -> { Orb::Alert::PriceFilter::Field } + + # @!attribute operator + # Should prices that match the filter be included or excluded. + # + # @return [Symbol, Orb::Models::Alert::PriceFilter::Operator] + required :operator, enum: -> { Orb::Alert::PriceFilter::Operator } + + # @!attribute values + # The IDs or values that match this filter. + # + # @return [Array] + required :values, Orb::Internal::Type::ArrayOf[String] + + # @!method initialize(field:, operator:, values:) + # @param field [Symbol, Orb::Models::Alert::PriceFilter::Field] The property of the price to filter on. + # + # @param operator [Symbol, Orb::Models::Alert::PriceFilter::Operator] Should prices that match the filter be included or excluded. + # + # @param values [Array] The IDs or values that match this filter. + + # The property of the price to filter on. + # + # @see Orb::Models::Alert::PriceFilter#field + module Field + extend Orb::Internal::Type::Enum + + PRICE_ID = :price_id + ITEM_ID = :item_id + PRICE_TYPE = :price_type + CURRENCY = :currency + PRICING_UNIT_ID = :pricing_unit_id + + # @!method self.values + # @return [Array] + end + + # Should prices that match the filter be included or excluded. + # + # @see Orb::Models::Alert::PriceFilter#operator + module Operator + extend Orb::Internal::Type::Enum + + INCLUDES = :includes + EXCLUDES = :excludes + + # @!method self.values + # @return [Array] + end + end + + class ThresholdOverride < Orb::Internal::Type::BaseModel + # @!attribute group_values + # The values of the grouping keys that identify this group. The list length + # matches the alert's grouping_keys. + # + # @return [Array] + required :group_values, Orb::Internal::Type::ArrayOf[String] + + # @!attribute thresholds + # The thresholds applied to this group. An empty list means the group is silenced. + # + # @return [Array] + required :thresholds, -> { Orb::Internal::Type::ArrayOf[Orb::Threshold] } + + # @!method initialize(group_values:, thresholds:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Alert::ThresholdOverride} for more details. + # + # A per-group threshold override on a grouped cost alert. + # + # An empty `thresholds` list means the group is silenced (never fires). A + # non-empty list fully replaces the default thresholds for that group. + # + # @param group_values [Array] The values of the grouping keys that identify this group. The list length matche + # + # @param thresholds [Array] The thresholds applied to this group. An empty list means the group is silenced. + end end end end diff --git a/lib/orb/models/alert_create_for_subscription_params.rb b/lib/orb/models/alert_create_for_subscription_params.rb index fc7a3371..05a44e4c 100644 --- a/lib/orb/models/alert_create_for_subscription_params.rb +++ b/lib/orb/models/alert_create_for_subscription_params.rb @@ -37,6 +37,16 @@ class AlertCreateForSubscriptionParams < Orb::Internal::Type::BaseModel # @return [String, nil] optional :metric_id, String, nil?: true + # @!attribute price_filters + # Filters to scope which prices are included in grouped cost alert evaluation. + # Supports filtering by price_id, item_id, or price_type with includes/excludes + # operators. Only applicable when grouping_keys is set. + # + # @return [Array, nil] + optional :price_filters, + -> { Orb::Internal::Type::ArrayOf[Orb::AlertCreateForSubscriptionParams::PriceFilter] }, + nil?: true + # @!attribute pricing_unit_id # The pricing unit to use for grouped cost alerts. Required when grouping_keys is # set. @@ -44,7 +54,19 @@ class AlertCreateForSubscriptionParams < Orb::Internal::Type::BaseModel # @return [String, nil] optional :pricing_unit_id, String, nil?: true - # @!method initialize(subscription_id:, thresholds:, type:, grouping_keys: nil, metric_id: nil, pricing_unit_id: nil, request_options: {}) + # @!attribute threshold_overrides + # Per-group threshold overrides. Each override maps a specific combination of + # grouping_keys values to a list of thresholds that fully replaces the default + # thresholds for that group. An empty thresholds list silences the group. Groups + # without an override use the default thresholds. Only applicable when + # grouping_keys is set. + # + # @return [Array, nil] + optional :threshold_overrides, + -> { Orb::Internal::Type::ArrayOf[Orb::AlertCreateForSubscriptionParams::ThresholdOverride] }, + nil?: true + + # @!method initialize(subscription_id:, thresholds:, type:, grouping_keys: nil, metric_id: nil, price_filters: nil, pricing_unit_id: nil, threshold_overrides: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::AlertCreateForSubscriptionParams} for more details. # @@ -58,8 +80,12 @@ class AlertCreateForSubscriptionParams < Orb::Internal::Type::BaseModel # # @param metric_id [String, nil] The metric to track usage for. # + # @param price_filters [Array, nil] Filters to scope which prices are included in grouped cost alert evaluation. Sup + # # @param pricing_unit_id [String, nil] The pricing unit to use for grouped cost alerts. Required when grouping_keys is # + # @param threshold_overrides [Array, nil] Per-group threshold overrides. Each override maps a specific combination of grou + # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] # The type of alert to create. This must be a valid alert type. @@ -72,6 +98,93 @@ module Type # @!method self.values # @return [Array] end + + class PriceFilter < Orb::Internal::Type::BaseModel + # @!attribute field + # The property of the price to filter on. + # + # @return [Symbol, Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::Field] + required :field, enum: -> { Orb::AlertCreateForSubscriptionParams::PriceFilter::Field } + + # @!attribute operator + # Should prices that match the filter be included or excluded. + # + # @return [Symbol, Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::Operator] + required :operator, enum: -> { Orb::AlertCreateForSubscriptionParams::PriceFilter::Operator } + + # @!attribute values + # The IDs or values that match this filter. + # + # @return [Array] + required :values, Orb::Internal::Type::ArrayOf[String] + + # @!method initialize(field:, operator:, values:) + # @param field [Symbol, Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::Field] The property of the price to filter on. + # + # @param operator [Symbol, Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::Operator] Should prices that match the filter be included or excluded. + # + # @param values [Array] The IDs or values that match this filter. + + # The property of the price to filter on. + # + # @see Orb::Models::AlertCreateForSubscriptionParams::PriceFilter#field + module Field + extend Orb::Internal::Type::Enum + + PRICE_ID = :price_id + ITEM_ID = :item_id + PRICE_TYPE = :price_type + CURRENCY = :currency + PRICING_UNIT_ID = :pricing_unit_id + + # @!method self.values + # @return [Array] + end + + # Should prices that match the filter be included or excluded. + # + # @see Orb::Models::AlertCreateForSubscriptionParams::PriceFilter#operator + module Operator + extend Orb::Internal::Type::Enum + + INCLUDES = :includes + EXCLUDES = :excludes + + # @!method self.values + # @return [Array] + end + end + + class ThresholdOverride < Orb::Internal::Type::BaseModel + # @!attribute group_values + # The values of the grouping keys that identify this group. The list length must + # match the alert's grouping_keys, and values appear in the same order as + # grouping_keys. + # + # @return [Array] + required :group_values, Orb::Internal::Type::ArrayOf[String] + + # @!attribute thresholds + # The thresholds to apply to this group. An empty list silences alerts for this + # group. A non-empty list fully replaces the default thresholds for this group. + # + # @return [Array] + required :thresholds, -> { Orb::Internal::Type::ArrayOf[Orb::Threshold] } + + # @!method initialize(group_values:, thresholds:) + # Some parameter documentations has been truncated, see + # {Orb::Models::AlertCreateForSubscriptionParams::ThresholdOverride} for more + # details. + # + # Per-group threshold override on a grouped cost alert. + # + # - An empty `thresholds` list silences alerts for this group (never fires). + # - A non-empty list fully replaces the default thresholds for this group. + # + # @param group_values [Array] The values of the grouping keys that identify this group. The list length must m + # + # @param thresholds [Array] The thresholds to apply to this group. An empty list silences alerts for this gr + end end end end diff --git a/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb b/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb index 3a7d10ef..9d027a5f 100644 --- a/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +++ b/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb @@ -158,11 +158,9 @@ class AddPrice < Orb::Internal::Type::BaseModel # @!attribute license_allocation_price # The license allocation price to add to the plan. # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput, nil] + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice, nil] optional :license_allocation_price, - union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice - }, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice }, nil?: true # @!attribute plan_phase_order @@ -174,7 +172,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # @!attribute price # New plan price request body params. # - # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] + # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] optional :price, union: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price }, nil?: true @@ -182,120 +180,358 @@ class AddPrice < Orb::Internal::Type::BaseModel # @!method initialize(allocation_price: nil, license_allocation_price: nil, plan_phase_order: nil, price: nil) # @param allocation_price [Orb::Models::NewAllocationPrice, nil] The allocation price to add to the plan. # - # @param license_allocation_price [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput, nil] The license allocation price to add to the plan. + # @param license_allocation_price [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice, nil] The license allocation price to add to the plan. # # @param plan_phase_order [Integer, nil] The phase to add this price to. # - # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] New plan price request body params. + # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] New plan price request body params. - # The license allocation price to add to the plan. - # # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice#license_allocation_price - module LicenseAllocationPrice + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence] + required :cadence, + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute license_allocations + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + # + # @return [Array] + required :license_allocations, + -> { Orb::Internal::Type::ArrayOf[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation] } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType] + required :model_type, + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType } + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute unit_config + # Configuration for unit pricing + # + # @return [Orb::Models::UnitConfig] + required :unit_config, -> { Orb::UnitConfig } + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, license_allocations:, model_type:, name:, unit_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice} + # for more details. + # + # The license allocation price to add to the plan. + # + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # + # @param model_type [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType] The pricing model type + # + # @param name [String] The name of the price. + # + # @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + + # The cadence to bill for this price on. + # + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + class LicenseAllocation < Orb::Internal::Type::BaseModel + # @!attribute amount + # The amount of credits granted per active license per cadence. + # + # @return [String] + required :amount, String + + # @!attribute currency + # The currency of the license allocation. + # + # @return [String] + required :currency, String + + # @!attribute write_off_overage + # When True, overage beyond the allocation is written off. + # + # @return [Boolean, nil] + optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + + # @!method initialize(amount:, currency:, write_off_overage: nil) + # @param amount [String] The amount of credits granted per active license per cadence. + # + # @param currency [String] The currency of the license allocation. + # + # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + end + + # The pricing model type + # + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice#model_type + module ModelType + extend Orb::Internal::Type::Enum + + UNIT = :unit + + # @!method self.values + # @return [Array] + end + end + + # New plan price request body params. + # + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice#price + module Price extend Orb::Internal::Type::Union discriminator :model_type - variant :unit, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit } + variant :unit, -> { Orb::NewPlanUnitPrice } - variant :tiered, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered } + variant :tiered, -> { Orb::NewPlanTieredPrice } - variant :bulk, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk } + variant :bulk, -> { Orb::NewPlanBulkPrice } variant :bulk_with_filters, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters } + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters } + + variant :package, -> { Orb::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 :matrix_with_threshold_discounts, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts } variant :tiered_with_proration, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration } + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration } - variant :unit_with_proration, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration } + variant :unit_with_proration, -> { Orb::NewPlanUnitWithProrationPrice } - variant :grouped_allocation, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation } + variant :grouped_allocation, -> { Orb::NewPlanGroupedAllocationPrice } - variant :bulk_with_proration, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration } + variant :bulk_with_proration, -> { Orb::NewPlanBulkWithProrationPrice } - variant :grouped_with_prorated_minimum, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum } + variant :grouped_with_prorated_minimum, -> { Orb::NewPlanGroupedWithProratedMinimumPrice } - variant :grouped_with_metered_minimum, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum } + variant :grouped_with_metered_minimum, -> { Orb::NewPlanGroupedWithMeteredMinimumPrice } variant :grouped_with_min_max_thresholds, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds } + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds } - variant :matrix_with_display_name, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName } + variant :matrix_with_display_name, -> { Orb::NewPlanMatrixWithDisplayNamePrice } - variant :grouped_tiered_package, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage } + variant :grouped_tiered_package, -> { Orb::NewPlanGroupedTieredPackagePrice } - variant :max_group_tiered_package, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage } + variant :max_group_tiered_package, -> { Orb::NewPlanMaxGroupTieredPackagePrice } - variant :scalable_matrix_with_unit_pricing, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing } + variant :scalable_matrix_with_unit_pricing, -> { Orb::NewPlanScalableMatrixWithUnitPricingPrice } - variant :scalable_matrix_with_tiered_pricing, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing } + variant :scalable_matrix_with_tiered_pricing, -> { Orb::NewPlanScalableMatrixWithTieredPricingPrice } - variant :cumulative_grouped_bulk, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk } + variant :cumulative_grouped_bulk, -> { Orb::NewPlanCumulativeGroupedBulkPrice } variant :cumulative_grouped_allocation, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation } + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation } - variant :minimum_composite, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite } + variant :daily_credit_allowance, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance } - variant :percent, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent } + variant :metered_allowance, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance } + + variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice } + + variant :percent, -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent } variant :event_output, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput } + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput } + + class BulkWithFilters < Orb::Internal::Type::BaseModel + # @!attribute bulk_with_filters_config + # Configuration for bulk_with_filters pricing + # + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig] + required :bulk_with_filters_config, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig } - class Unit < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence } + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -303,24 +539,11 @@ class Unit < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation - ] - end - # @!attribute model_type # The pricing model type # - # @return [Symbol, :unit] - required :model_type, const: :unit + # @return [Symbol, :bulk_with_filters] + required :model_type, const: :bulk_with_filters # @!attribute name # The name of the price. @@ -328,12 +551,6 @@ class Unit < Orb::Internal::Type::BaseModel # @return [String] required :name, String - # @!attribute unit_config - # Configuration for unit pricing - # - # @return [Orb::Models::UnitConfig] - required :unit_config, -> { Orb::UnitConfig } - # @!attribute billable_metric_id # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -367,7 +584,7 @@ class Unit < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::ConversionRateConfig }, nil?: true @@ -435,21 +652,19 @@ class Unit < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit) + # @!method initialize(bulk_with_filters_config:, cadence:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_filters) # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters} # for more details. # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence] The cadence to bill for this price on. + # @param bulk_with_filters_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing # - # @param item_id [String] The id of the item the price will be associated with. + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence] The cadence to bill for this price on. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # @param item_id [String] The id of the item the price will be associated with. # # @param name [String] The name of the price. # - # @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing - # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b # # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi @@ -478,11 +693,85 @@ class Unit < Orb::Internal::Type::BaseModel # # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments # - # @param model_type [Symbol, :unit] The pricing model type + # @param model_type [Symbol, :bulk_with_filters] The pricing model type + + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters#bulk_with_filters_config + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + # @!attribute filters + # Property filters to apply (all must match) + # + # @return [Array] + required :filters, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ] + end + + # @!attribute tiers + # Bulk tiers for rating based on total usage volume + # + # @return [Array] + required :tiers, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + end + + # @!method initialize(filters:, tiers:) + # Configuration for bulk_with_filters pricing + # + # @param filters [Array] Property filters to apply (all must match) + # + # @param tiers [Array] Bulk tiers for rating based on total usage volume + + class Filter < Orb::Internal::Type::BaseModel + # @!attribute property_key + # Event property key to filter on + # + # @return [String] + required :property_key, String + + # @!attribute property_value + # Event property value to match + # + # @return [String] + required :property_value, String + + # @!method initialize(property_key:, property_value:) + # Configuration for a single property filter + # + # @param property_key [String] Event property key to filter on + # + # @param property_value [String] Event property value to match + end + + class Tier < Orb::Internal::Type::BaseModel + # @!attribute unit_amount + # Amount per unit + # + # @return [String] + required :unit_amount, String + + # @!attribute tier_lower_bound + # The lower bound for this tier + # + # @return [String, nil] + optional :tier_lower_bound, String, nil?: true + + # @!method initialize(unit_amount:, tier_lower_bound: nil) + # Configuration for a single bulk pricing tier + # + # @param unit_amount [String] Amount per unit + # + # @param tier_lower_bound [String, nil] The lower bound for this tier + end + end # The cadence to bill for this price on. # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters#cadence module Cadence extend Orb::Internal::Type::Enum @@ -496,42 +785,15 @@ module Cadence # @!method self.values # @return [Array] end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end end - class Tiered < Orb::Internal::Type::BaseModel + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence } + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -539,24 +801,18 @@ class Tiered < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. + # @!attribute matrix_with_threshold_discounts_config + # Configuration for matrix_with_threshold_discounts pricing # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation - ] - end + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] + required :matrix_with_threshold_discounts_config, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig } # @!attribute model_type # The pricing model type # - # @return [Symbol, :tiered] - required :model_type, const: :tiered + # @return [Symbol, :matrix_with_threshold_discounts] + required :model_type, const: :matrix_with_threshold_discounts # @!attribute name # The name of the price. @@ -564,12 +820,6 @@ class Tiered < Orb::Internal::Type::BaseModel # @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. @@ -603,7 +853,7 @@ class Tiered < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::ConversionRateConfig }, nil?: true @@ -671,21 +921,19 @@ class Tiered < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered) + # @!method initialize(cadence:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_threshold_discounts) # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts} # for more details. # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # @param matrix_with_threshold_discounts_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing # # @param name [String] The name of the price. # - # @param 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 @@ -714,11 +962,11 @@ class Tiered < Orb::Internal::Type::BaseModel # # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments # - # @param model_type [Symbol, :tiered] The pricing model type + # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts#cadence module Cadence extend Orb::Internal::Type::Enum @@ -733,47 +981,139 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + # @!attribute default_unit_amount + # Unit price used for usage that does not match any defined matrix cell. # # @return [String] - required :amount, String + required :default_unit_amount, String - # @!attribute currency - # The currency of the license allocation. + # @!attribute first_dimension + # First matrix dimension key. # # @return [String] - required :currency, String + required :first_dimension, String + + # @!attribute matrix_values + # Per-cell unit prices. + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + end - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. + # @!attribute second_dimension + # Optional second matrix dimension key. + # + # @return [String, nil] + optional :second_dimension, String, nil?: true + + # @!attribute threshold_discount_groups # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @return [Array, nil] + optional :threshold_discount_groups, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + end - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. + # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil) + # Configuration for matrix_with_threshold_discounts pricing + # + # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell. + # + # @param first_dimension [String] First matrix dimension key. + # + # @param matrix_values [Array] Per-cell unit prices. # - # @param currency [String] The currency of the license allocation. + # @param second_dimension [String, nil] Optional second matrix dimension key. # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + # @param threshold_discount_groups [Array] + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute first_dimension_value + # + # @return [String] + required :first_dimension_value, String + + # @!attribute unit_amount + # + # @return [String] + required :unit_amount, String + + # @!attribute second_dimension_value + # + # @return [String, nil] + optional :second_dimension_value, String, nil?: true + + # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil) + # @param first_dimension_value [String] + # @param unit_amount [String] + # @param second_dimension_value [String, nil] + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + # @!attribute above_threshold_discount_percentage + # Discount rate applied to spend above the threshold. + # + # @return [String] + required :above_threshold_discount_percentage, String + + # @!attribute below_threshold_discount_percentage + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + # + # @return [String] + required :below_threshold_discount_percentage, String + + # @!attribute cell_coordinates + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + # + # @return [String] + required :cell_coordinates, String + + # @!attribute threshold_amount + # + # @return [String] + required :threshold_amount, String + + # @!attribute description + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup} + # for more details. + # + # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold. + # + # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli + # + # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # + # @param threshold_amount [String] + # + # @param description [String, nil] + end end end - class Bulk < Orb::Internal::Type::BaseModel - # @!attribute bulk_config - # Configuration for bulk pricing - # - # @return [Orb::Models::BulkConfig] - required :bulk_config, -> { Orb::BulkConfig } - + class TieredWithProration < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence } + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -781,24 +1121,11 @@ class Bulk < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation - ] - end - # @!attribute model_type # The pricing model type # - # @return [Symbol, :bulk] - required :model_type, const: :bulk + # @return [Symbol, :tiered_with_proration] + required :model_type, const: :tiered_with_proration # @!attribute name # The name of the price. @@ -806,6 +1133,13 @@ class Bulk < Orb::Internal::Type::BaseModel # @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. @@ -839,7 +1173,7 @@ class Bulk < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::ConversionRateConfig }, nil?: true @@ -907,21 +1241,19 @@ class Bulk < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(bulk_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk) + # @!method initialize(cadence:, item_id:, name:, tiered_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_proration) # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration} # for more details. # - # @param bulk_config [Orb::Models::BulkConfig] Configuration for bulk pricing - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # # @param name [String] The name of the price. # + # @param tiered_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 @@ -950,11 +1282,11 @@ class Bulk < Orb::Internal::Type::BaseModel # # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments # - # @param model_type [Symbol, :bulk] The pricing model type + # @param model_type [Symbol, :tiered_with_proration] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration#cadence module Cadence extend Orb::Internal::Type::Enum @@ -969,48 +1301,66 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration#tiered_with_proration_config + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + # @!attribute tiers + # Tiers for rating based on total usage quantities into the specified tier with + # proration # - # @return [String] - required :amount, String + # @return [Array] + required :tiers, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] + end - # @!attribute currency - # The currency of the license allocation. + # @!method initialize(tiers:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig} + # for more details. # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. + # Configuration for tiered_with_proration pricing # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @param tiers [Array] Tiers for rating based on total usage quantities into the specified tier with pr - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + class Tier < Orb::Internal::Type::BaseModel + # @!attribute tier_lower_bound + # Inclusive tier starting value + # + # @return [String] + required :tier_lower_bound, String + + # @!attribute unit_amount + # Amount per unit + # + # @return [String] + required :unit_amount, String + + # @!method initialize(tier_lower_bound:, unit_amount:) + # Configuration for a single tiered with proration tier + # + # @param tier_lower_bound [String] Inclusive tier starting value + # + # @param unit_amount [String] Amount per unit + end end end - class 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 } - + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::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. @@ -1018,24 +1368,11 @@ 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::BulkWithFilters::LicenseAllocation - ] - end - # @!attribute model_type # The pricing model type # - # @return [Symbol, :bulk_with_filters] - required :model_type, const: :bulk_with_filters + # @return [Symbol, :grouped_with_min_max_thresholds] + required :model_type, const: :grouped_with_min_max_thresholds # @!attribute name # The name of the price. @@ -1076,7 +1413,7 @@ class BulkWithFilters < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::ConversionRateConfig }, nil?: true @@ -1144,19 +1481,17 @@ class BulkWithFilters < Orb::Internal::Type::BaseModel # @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) + # @!method initialize(cadence:, grouped_with_min_max_thresholds_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_min_max_thresholds) # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds} # 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::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence] The cadence to bill for this price on. + # @param grouped_with_min_max_thresholds_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # # @param name [String] The name of the price. # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b @@ -1187,85 +1522,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::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 + # @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::BulkWithFilters#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1280,41 +1541,59 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. + # @see Orb::Models::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 :amount, String + required :maximum_charge, String - # @!attribute currency - # The currency of the license allocation. + # @!attribute minimum_charge + # The minimum amount to charge each group, regardless of usage # # @return [String] - required :currency, String + required :minimum_charge, String - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. + # @!attribute per_unit_rate + # The base price charged per group # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @return [String] + required :per_unit_rate, String - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. + # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:) + # Configuration for grouped_with_min_max_thresholds pricing + # + # @param grouping_key [String] The event property used to group before applying thresholds + # + # @param maximum_charge [String] The maximum amount to charge each group # - # @param currency [String] The currency of the license allocation. + # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + # @param per_unit_rate [String] The base price charged per group end end - class Package < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::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. @@ -1322,24 +1601,11 @@ class Package < 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::Package::LicenseAllocation - ] - end - # @!attribute model_type # The pricing model type # - # @return [Symbol, :package] - required :model_type, const: :package + # @return [Symbol, :cumulative_grouped_allocation] + required :model_type, const: :cumulative_grouped_allocation # @!attribute name # The name of the price. @@ -1347,12 +1613,6 @@ class Package < Orb::Internal::Type::BaseModel # @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. @@ -1386,7 +1646,7 @@ class Package < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::ConversionRateConfig }, nil?: true @@ -1454,21 +1714,19 @@ class Package < Orb::Internal::Type::BaseModel # @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) + # @!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::LicenseAllocationPrice::Package} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation} # for more details. # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::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 cumulative_grouped_allocation_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # @param item_id [String] The id of the item the price will be associated with. # # @param name [String] The name of the price. # - # @param 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 @@ -1497,11 +1755,11 @@ class Package < 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, :package] The pricing model type + # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1516,41 +1774,59 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. + # @see Orb::Models::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 :amount, String + required :group_allocation, String - # @!attribute currency - # The currency of the license allocation. + # @!attribute grouping_key + # The event property used to group usage before applying allocations # # @return [String] - required :currency, String + required :grouping_key, String - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. + # @!attribute unit_amount + # The amount to charge for each unit outside of the allocation # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @return [String] + required :unit_amount, String - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. + # @!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 currency [String] The currency of the license allocation. + # @param grouping_key [String] The event property used to group usage before applying allocations # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + # @param unit_amount [String] The amount to charge for each unit outside of the allocation end end - class Matrix < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence } + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence } + + # @!attribute daily_credit_allowance_config + # Configuration for daily_credit_allowance pricing + # + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] + required :daily_credit_allowance_config, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig } # @!attribute item_id # The id of the item the price will be associated with. @@ -1558,30 +1834,11 @@ class Matrix < 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::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 + # @return [Symbol, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance # @!attribute name # The name of the price. @@ -1622,7 +1879,7 @@ class Matrix < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::ConversionRateConfig }, nil?: true @@ -1690,18 +1947,16 @@ class Matrix < Orb::Internal::Type::BaseModel # @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) + # @!method initialize(cadence:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :daily_credit_allowance) # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance} # 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 cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence] The cadence to bill for this price on. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # @param daily_credit_allowance_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing # - # @param matrix_config [Orb::Models::MatrixConfig] Configuration for matrix pricing + # @param item_id [String] The id of the item the price will be associated with. # # @param name [String] The name of the price. # @@ -1733,11 +1988,11 @@ class Matrix < 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, :matrix] The pricing model type + # @param model_type [Symbol, :daily_credit_allowance] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1752,41 +2007,99 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance#daily_credit_allowance_config + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute daily_allowance + # Credits granted per day. Lose-it-or-use-it; does not roll over. # # @return [String] - required :amount, String + required :daily_allowance, String - # @!attribute currency - # The currency of the license allocation. + # @!attribute default_unit_amount + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value # # @return [String] - required :currency, String + required :default_unit_amount, String - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @return [Array] + required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true] - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. + # @!attribute event_day_property + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. # - # @param currency [String] The currency of the license allocation. + # @return [String] + required :event_day_property, String + + # @!attribute matrix_values + # Per-dimension credit rates # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + 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 } + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig} + # for more details. + # + # Configuration for daily_credit_allowance pricing + # + # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified + # matrix\_ + # + # @param dimensions [Array] One or two event property values to evaluate matrix groups by + # + # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g. + # + # @param matrix_values [Array] Per-dimension credit rates + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + # + # @return [Array] + required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Credits charged per unit of usage matching the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!method initialize(dimension_values:, unit_amount:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue} + # for more details. + # + # Per-dimension credit price for the daily credit allowance model. + # + # @param dimension_values [Array] One or two matrix keys to filter usage to this value by. For example, ["model"] + # + # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values + end + end + end + + class MeteredAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence] + required :cadence, + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -1794,24 +2107,18 @@ class ThresholdTotalAmount < 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. + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ] - end + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig } # @!attribute model_type # The pricing model type # - # @return [Symbol, :threshold_total_amount] - required :model_type, const: :threshold_total_amount + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance # @!attribute name # The name of the price. @@ -1819,13 +2126,6 @@ class ThresholdTotalAmount < Orb::Internal::Type::BaseModel # @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. @@ -1859,7 +2159,7 @@ class ThresholdTotalAmount < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::ConversionRateConfig }, nil?: true @@ -1927,21 +2227,19 @@ class ThresholdTotalAmount < Orb::Internal::Type::BaseModel # @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) + # @!method initialize(cadence:, item_id:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :metered_allowance) # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance} # for more details. # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # @param metered_allowance_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing # # @param name [String] The name of the price. # - # @param 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 @@ -1970,11 +2268,11 @@ class ThresholdTotalAmount < 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, :threshold_total_amount] The pricing model type + # @param model_type [Symbol, :metered_allowance] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1989,93 +2287,77 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance#metered_allowance_config + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute allowance_grouping_value + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. # # @return [String] - required :amount, String + required :allowance_grouping_value, String - # @!attribute currency - # The currency of the license allocation. + # @!attribute consumption_grouping_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. # # @return [String] - required :currency, String + required :consumption_grouping_value, String - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. + # @!attribute grouping_key + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @return [String] + required :grouping_key, String - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. + # @!attribute unit_amount + # Per-unit price applied to gross consumption and to the allowance credit. # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end + # @return [String] + required :unit_amount, String - # @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 + # @!attribute allowance_display_name + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). # - # @return [Array] - required :consumption_table, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ] - end + # @return [String, nil] + optional :allowance_display_name, String - # @!attribute prorate - # If true, the unit price will be prorated to the billing period + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean, nil?: true + # @return [String, nil] + optional :consumption_display_name, String - # @!method initialize(consumption_table:, prorate: nil) + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig} # for more details. # - # Configuration for threshold_total_amount pricing + # Configuration for metered_allowance pricing # - # @param consumption_table [Array] When the quantity consumed passes a provided threshold, the configured total wil + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p # - # @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 + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl + # + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant + # + # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit. + # + # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten'). end end - class TieredPackage < Orb::Internal::Type::BaseModel + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence } + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -2083,24 +2365,11 @@ class TieredPackage < 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::TieredPackage::LicenseAllocation - ] - end - # @!attribute model_type # The pricing model type # - # @return [Symbol, :tiered_package] - required :model_type, const: :tiered_package + # @return [Symbol, :percent] + required :model_type, const: :percent # @!attribute name # The name of the price. @@ -2108,12 +2377,12 @@ class TieredPackage < Orb::Internal::Type::BaseModel # @return [String] required :name, String - # @!attribute tiered_package_config - # Configuration for tiered_package pricing + # @!attribute percent_config + # Configuration for percent pricing # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig] - required :tiered_package_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig } + # @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 @@ -2148,7 +2417,7 @@ class TieredPackage < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::ConversionRateConfig }, nil?: true @@ -2216,20 +2485,18 @@ class TieredPackage < Orb::Internal::Type::BaseModel # @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) + # @!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::LicenseAllocationPrice::TieredPackage} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent} # for more details. # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # # @param name [String] The name of the price. # - # @param tiered_package_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig] Configuration for tiered_package pricing + # @param percent_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig] Configuration for percent pricing # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b # @@ -2259,11 +2526,11 @@ class TieredPackage < 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_package] The pricing model type + # @param model_type [Symbol, :percent] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent#cadence module Cadence extend Orb::Internal::Type::Enum @@ -2278,94 +2545,35 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::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. + # @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 [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - end + # @return [Float] + required :percent, Float - # @!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] + # @!method initialize(percent:) + # Configuration for percent pricing # - # @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 + # @param percent [Float] What percent of the component subtotals to charge end end - class TieredWithMinimum < Orb::Internal::Type::BaseModel + class EventOutput < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::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. @@ -2373,24 +2581,11 @@ class TieredWithMinimum < 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::TieredWithMinimum::LicenseAllocation - ] - end - # @!attribute model_type # The pricing model type # - # @return [Symbol, :tiered_with_minimum] - required :model_type, const: :tiered_with_minimum + # @return [Symbol, :event_output] + required :model_type, const: :event_output # @!attribute name # The name of the price. @@ -2398,13 +2593,6 @@ class TieredWithMinimum < Orb::Internal::Type::BaseModel # @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. @@ -2438,7 +2626,7 @@ class TieredWithMinimum < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::ConversionRateConfig }, nil?: true @@ -2506,21 +2694,19 @@ class TieredWithMinimum < Orb::Internal::Type::BaseModel # @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) + # @!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::LicenseAllocationPrice::TieredWithMinimum} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput} # for more details. # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence] The cadence to bill for this price on. # - # @param item_id [String] The id of the item the price will be associated with. + # @param event_output_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig] Configuration for event_output pricing # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # @param item_id [String] The id of the item the price will be associated with. # # @param name [String] The name of the price. # - # @param 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 @@ -2549,11 +2735,11 @@ class TieredWithMinimum < 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_minimum] The pricing model type + # @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::TieredWithMinimum#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput#cadence module Cadence extend Orb::Internal::Type::Enum @@ -2568,16060 +2754,531 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::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 :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param 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 + required :unit_rating_key, String - # @!attribute hide_zero_amount_tiers - # If true, tiers with an accrued amount of 0 will not be included in the rating. + # @!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 [Boolean, nil] - optional :hide_zero_amount_tiers, Orb::Internal::Type::Boolean + # @return [String, nil] + optional :default_unit_rate, String, nil?: true - # @!attribute prorate - # If true, the unit price will be prorated to the billing period + # @!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 [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean + # @return [String, nil] + optional :grouping_key, String, nil?: true - # @!method initialize(tiers:, hide_zero_amount_tiers: nil, prorate: nil) + # @!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::TieredWithMinimum::TieredWithMinimumConfig} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig} # for more details. # - # Configuration for tiered_with_minimum pricing + # Configuration for event_output pricing # - # @param tiers [Array] Tiered pricing with a minimum amount dependent on the volume tier. Tiers are def + # @param unit_rating_key [String] The key in the event data to extract the unit rate from. # - # @param hide_zero_amount_tiers [Boolean] If true, tiers with an accrued amount of 0 will not be included in the rating. + # @param default_unit_rate [String, nil] If provided, this amount will be used as the unit rate when an event does not ha # - # @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 + # @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 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 } + # @!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::MatrixWithThresholdDiscounts, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput)] + end + end - # @!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 } + 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 item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String + # @!attribute plan_phase_order + # The phase to remove this adjustment from. + # + # @return [Integer, nil] + optional :plan_phase_order, Integer, nil?: true - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines 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 + # @!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 - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_tiered] - required :model_type, const: :grouped_tiered + 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 name - # The name of the price. - # - # @return [String] - required :name, String + # @!attribute plan_phase_order + # The phase to remove this price from. + # + # @return [Integer, nil] + optional :plan_phase_order, Integer, nil?: true - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, nil?: true - - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for 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 + # @!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 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 } + 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 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 replaces_adjustment_id + # The id of the adjustment on the plan to replace in the plan. + # + # @return [String] + required :replaces_adjustment_id, String - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String + # @!attribute plan_phase_order + # The phase to replace this adjustment from. + # + # @return [Integer, nil] + optional :plan_phase_order, Integer, nil?: true - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines 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 + # @!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. - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :cumulative_grouped_allocation] - required :model_type, const: :cumulative_grouped_allocation + # 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 - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String + discriminator :adjustment_type - # @!attribute billable_metric_id - # The id of 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 :percentage_discount, -> { Orb::NewPercentageDiscount } - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance 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 :usage_discount, -> { Orb::NewUsageDiscount } - # @!attribute billing_cycle_configuration - # For custom cadence: 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 :amount_discount, -> { Orb::NewAmountDiscount } - # @!attribute 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 :minimum, -> { Orb::NewMinimum } - # @!attribute conversion_rate_config - # The configuration for 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 + variant :maximum, -> { Orb::NewMaximum } - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true + # @!method self.variants + # @return [Array(Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum)] + end + 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 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 external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true + # @!attribute allocation_price + # The allocation price to add to the plan. + # + # @return [Orb::Models::NewAllocationPrice, nil] + optional :allocation_price, -> { Orb::NewAllocationPrice }, nil?: true - # @!attribute fixed_price_quantity - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true + # @!attribute license_allocation_price + # The license allocation price to add to the plan. + # + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice, nil] + optional :license_allocation_price, + -> { + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice + }, + nil?: true - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true + # @!attribute plan_phase_order + # The phase to replace this price from. + # + # @return [Integer, nil] + optional :plan_phase_order, Integer, nil?: true - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, 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::MatrixWithThresholdDiscounts, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] + optional :price, + union: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price }, + nil?: true - # @!attribute license_type_id - # The ID of the license type to associate with this price. - # - # @return [String, nil] - optional :license_type_id, String, nil?: true + # @!method initialize(replaces_price_id:, allocation_price: nil, license_allocation_price: nil, plan_phase_order: nil, price: nil) + # @param replaces_price_id [String] The id of the price on the plan to replace in the plan. + # + # @param allocation_price [Orb::Models::NewAllocationPrice, nil] The allocation price to add to the plan. + # + # @param license_allocation_price [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice, nil] The license allocation price to add to the plan. + # + # @param plan_phase_order [Integer, nil] The phase to replace this price from. + # + # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] New plan price request body params. - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice#license_allocation_price + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence] + required :cadence, + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute license_allocations + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + # + # @return [Array] + required :license_allocations, + -> { Orb::Internal::Type::ArrayOf[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation] } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType] + required :model_type, + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType } + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute unit_config + # Configuration for unit pricing + # + # @return [Orb::Models::UnitConfig] + required :unit_config, -> { Orb::UnitConfig } + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, license_allocations:, model_type:, name:, unit_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice} + # for more details. + # + # The license allocation price to add to the plan. + # + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # + # @param model_type [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType] The pricing model type + # + # @param name [String] The name of the price. + # + # @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + + # The cadence to bill for this price on. + # + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. + class LicenseAllocation < Orb::Internal::Type::BaseModel + # @!attribute amount + # The amount of credits granted per active license per cadence. # - # @return [String, nil] - optional :reference_id, String, nil?: true + # @return [String] + required :amount, String - # @!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 + # @!attribute currency + # The currency of the license allocation. # - # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type + # @return [String] + required :currency, String - # The cadence to bill for this price on. + # @!attribute write_off_overage + # When True, overage beyond the allocation is written off. # - # @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 + # @return [Boolean, nil] + optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - # @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 + # @!method initialize(amount:, currency:, write_off_overage: nil) + # @param amount [String] The amount of credits granted per active license per cadence. + # + # @param currency [String] The currency of the license allocation. + # + # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + end - # @!attribute group_allocation - # The allocation per individual group - # - # @return [String] - required :group_allocation, String + # The pricing model type + # + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice#model_type + module ModelType + extend Orb::Internal::Type::Enum - # @!attribute grouping_key - # The event property used to group usage before applying allocations - # - # @return [String] - required :grouping_key, String + UNIT = :unit - # @!attribute unit_amount - # The amount to charge for each unit outside of the allocation - # - # @return [String] - required :unit_amount, String + # @!method self.values + # @return [Array] + end + end - # @!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 + # New plan price request body params. + # + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice#price + module Price + extend Orb::Internal::Type::Union - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String + discriminator :model_type - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String + variant :unit, -> { Orb::NewPlanUnitPrice } - # @!attribute write_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 :tiered, -> { Orb::NewPlanTieredPrice } - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param 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 + variant :bulk, -> { Orb::NewPlanBulkPrice } - class MinimumComposite < Orb::Internal::Type::BaseModel - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence] - required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence } + variant :bulk_with_filters, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters } - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String + variant :package, -> { Orb::NewPlanPackagePrice } - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines 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 + variant :matrix, -> { Orb::NewPlanMatrixPrice } - # @!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 } + variant :threshold_total_amount, -> { Orb::NewPlanThresholdTotalAmountPrice } - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :minimum_composite] - required :model_type, const: :minimum_composite + variant :tiered_package, -> { Orb::NewPlanTieredPackagePrice } - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String + variant :tiered_with_minimum, -> { Orb::NewPlanTieredWithMinimumPrice } - # @!attribute billable_metric_id - # The id of 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 :grouped_tiered, -> { Orb::NewPlanGroupedTieredPrice } - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance 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 :tiered_package_with_minimum, -> { Orb::NewPlanTieredPackageWithMinimumPrice } - # @!attribute billing_cycle_configuration - # For custom cadence: 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_with_allocation, -> { Orb::NewPlanPackageWithAllocationPrice } - # @!attribute 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 :unit_with_percent, -> { Orb::NewPlanUnitWithPercentPrice } - # @!attribute conversion_rate_config - # The configuration for 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::MinimumComposite::ConversionRateConfig - }, - nil?: true + variant :matrix_with_allocation, -> { Orb::NewPlanMatrixWithAllocationPrice } - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true + variant :matrix_with_threshold_discounts, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts } - # @!attribute dimensional_price_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_with_proration, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration } - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true + variant :unit_with_proration, -> { Orb::NewPlanUnitWithProrationPrice } - # @!attribute fixed_price_quantity - # 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_allocation, -> { Orb::NewPlanGroupedAllocationPrice } - # @!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 :bulk_with_proration, -> { Orb::NewPlanBulkWithProrationPrice } - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are 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 :grouped_with_prorated_minimum, -> { Orb::NewPlanGroupedWithProratedMinimumPrice } - # @!attribute 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 :grouped_with_metered_minimum, -> { Orb::NewPlanGroupedWithMeteredMinimumPrice } - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can 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 :grouped_with_min_max_thresholds, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds } - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true + variant :matrix_with_display_name, -> { Orb::NewPlanMatrixWithDisplayNamePrice } - # @!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::ReplacePrice::LicenseAllocationPrice::MinimumComposite} - # for more details. - # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. - # - # @param 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 - # - # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi - # - # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont - # - # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. - # - # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. - # - # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr - # - # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values - # - # @param external_price_id [String, nil] An alias for the price. - # - # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl - # - # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice - # - # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be 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 + variant :grouped_tiered_package, -> { Orb::NewPlanGroupedTieredPackagePrice } - # The cadence to bill for this price on. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite#cadence - module Cadence - extend Orb::Internal::Type::Enum + variant :max_group_tiered_package, -> { Orb::NewPlanMaxGroupTieredPackagePrice } - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom + variant :scalable_matrix_with_unit_pricing, -> { Orb::NewPlanScalableMatrixWithUnitPricingPrice } - # @!method self.values - # @return [Array] - end + variant :scalable_matrix_with_tiered_pricing, -> { Orb::NewPlanScalableMatrixWithTieredPricingPrice } - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String + variant :cumulative_grouped_bulk, -> { Orb::NewPlanCumulativeGroupedBulkPrice } - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String + variant :cumulative_grouped_allocation, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation } - # @!attribute write_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 :daily_credit_allowance, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance } - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end + variant :metered_allowance, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance } - # @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 - # - # @return [String] - required :minimum_amount, String + variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice } - # @!attribute prorated - # If true, subtotals from this price are prorated based on the service period - # - # @return [Boolean, nil] - optional :prorated, Orb::Internal::Type::Boolean + variant :percent, -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent } - # @!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 + variant :event_output, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput } + + class BulkWithFilters < Orb::Internal::Type::BaseModel + # @!attribute bulk_with_filters_config + # Configuration for bulk_with_filters pricing + # + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig] + required :bulk_with_filters_config, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig } - class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence } + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -18629,24 +3286,11 @@ 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 # - # @return [Symbol, :percent] - required :model_type, const: :percent + # @return [Symbol, :bulk_with_filters] + required :model_type, const: :bulk_with_filters # @!attribute name # The name of the price. @@ -18654,13 +3298,6 @@ class Percent < Orb::Internal::Type::BaseModel # @return [String] required :name, String - # @!attribute percent_config - # Configuration for percent pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig] - required :percent_config, - -> { 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 # usage-based. @@ -18694,7 +3331,7 @@ class Percent < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::ConversionRateConfig }, nil?: true @@ -18762,21 +3399,19 @@ class Percent < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(cadence:, item_id:, license_allocations:, name:, percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :percent) + # @!method initialize(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::ReplacePrice::LicenseAllocationPrice::Percent} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters} # for more details. # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence] The cadence to bill for this price on. + # @param bulk_with_filters_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing + # + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # # @param name [String] The name of the price. # - # @param 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 # # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi @@ -18805,11 +3440,85 @@ class Percent < 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, :percent] The pricing model type + # @param model_type [Symbol, :bulk_with_filters] The pricing model type + + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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::ReplacePrice::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::ReplacePrice::LicenseAllocationPrice::Percent#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters#cadence module Cadence extend Orb::Internal::Type::Enum @@ -18823,63 +3532,15 @@ module Cadence # @!method self.values # @return [Array] end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @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 - # - # @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 + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence } - - # @!attribute event_output_config - # Configuration for event_output pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig] - required :event_output_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig } + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -18887,24 +3548,18 @@ 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. + # @!attribute matrix_with_threshold_discounts_config + # Configuration for matrix_with_threshold_discounts pricing # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation - ] - end + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] + required :matrix_with_threshold_discounts_config, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig } # @!attribute model_type # The pricing model type # - # @return [Symbol, :event_output] - required :model_type, const: :event_output + # @return [Symbol, :matrix_with_threshold_discounts] + required :model_type, const: :matrix_with_threshold_discounts # @!attribute name # The name of the price. @@ -18945,7 +3600,7 @@ class EventOutput < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::ConversionRateConfig }, nil?: true @@ -19013,18 +3668,16 @@ class EventOutput < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(cadence:, event_output_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :event_output) + # @!method initialize(cadence:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_threshold_discounts) # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts} # for more details. # - # @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::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig] Configuration for event_output pricing + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # @param matrix_with_threshold_discounts_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing # # @param name [String] The name of the price. # @@ -19056,11 +3709,11 @@ class EventOutput < 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, :event_output] The pricing model type + # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts#cadence module Cadence extend Orb::Internal::Type::Enum @@ -19075,164 +3728,386 @@ module Cadence # @return [Array] end - # @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. + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + # @!attribute default_unit_amount + # Unit price used for usage that does not match any defined matrix cell. # # @return [String] - required :unit_rating_key, String + required :default_unit_amount, 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. + # @!attribute first_dimension + # First matrix dimension key. # - # @return [String, nil] - optional :default_unit_rate, String, nil?: true + # @return [String] + required :first_dimension, String - # @!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. + # @!attribute matrix_values + # Per-cell unit prices. + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + end + + # @!attribute second_dimension + # Optional second matrix dimension key. # # @return [String, nil] - optional :grouping_key, String, nil?: true + optional :second_dimension, 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::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig} - # for more details. + # @!attribute threshold_discount_groups # - # Configuration for event_output pricing + # @return [Array, nil] + optional :threshold_discount_groups, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + end + + # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil) + # Configuration for matrix_with_threshold_discounts pricing # - # @param unit_rating_key [String] The key in the event data to extract the unit rate from. + # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell. # - # @param default_unit_rate [String, nil] If provided, this amount will be used as the unit rate when an event does not ha + # @param first_dimension [String] First matrix dimension key. # - # @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. + # @param matrix_values [Array] Per-cell unit prices. # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. + # @param second_dimension [String, nil] Optional second matrix dimension key. # - # @return [String] - required :currency, String + # @param threshold_discount_groups [Array] - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute first_dimension_value + # + # @return [String] + required :first_dimension_value, String - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - end + # @!attribute unit_amount + # + # @return [String] + required :unit_amount, String - # @!method self.variants - # @return [Array(Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput)] - end + # @!attribute second_dimension_value + # + # @return [String, nil] + optional :second_dimension_value, String, nil?: true - # New plan price request body params. - # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice#price - module Price - extend Orb::Internal::Type::Union + # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil) + # @param first_dimension_value [String] + # @param unit_amount [String] + # @param second_dimension_value [String, nil] + end - discriminator :model_type + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + # @!attribute above_threshold_discount_percentage + # Discount rate applied to spend above the threshold. + # + # @return [String] + required :above_threshold_discount_percentage, String - variant :unit, -> { Orb::NewPlanUnitPrice } + # @!attribute below_threshold_discount_percentage + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + # + # @return [String] + required :below_threshold_discount_percentage, String - variant :tiered, -> { Orb::NewPlanTieredPrice } + # @!attribute cell_coordinates + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + # + # @return [String] + required :cell_coordinates, String - variant :bulk, -> { Orb::NewPlanBulkPrice } + # @!attribute threshold_amount + # + # @return [String] + required :threshold_amount, String - variant :bulk_with_filters, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters } + # @!attribute description + # + # @return [String, nil] + optional :description, String, nil?: true - variant :package, -> { Orb::NewPlanPackagePrice } + # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup} + # for more details. + # + # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold. + # + # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli + # + # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # + # @param threshold_amount [String] + # + # @param description [String, nil] + end + end + end - variant :matrix, -> { Orb::NewPlanMatrixPrice } + class TieredWithProration < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence] + required :cadence, + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence } - variant :threshold_total_amount, -> { Orb::NewPlanThresholdTotalAmountPrice } + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String - variant :tiered_package, -> { Orb::NewPlanTieredPackagePrice } + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :tiered_with_proration] + required :model_type, const: :tiered_with_proration - variant :tiered_with_minimum, -> { Orb::NewPlanTieredWithMinimumPrice } + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String - variant :grouped_tiered, -> { Orb::NewPlanGroupedTieredPrice } + # @!attribute tiered_with_proration_config + # Configuration for tiered_with_proration pricing + # + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig] + required :tiered_with_proration_config, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig } - variant :tiered_package_with_minimum, -> { Orb::NewPlanTieredPackageWithMinimumPrice } + # @!attribute billable_metric_id + # The id of 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 :package_with_allocation, -> { Orb::NewPlanPackageWithAllocationPrice } + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance 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 :unit_with_percent, -> { Orb::NewPlanUnitWithPercentPrice } + # @!attribute billing_cycle_configuration + # For custom cadence: 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 :matrix_with_allocation, -> { Orb::NewPlanMatrixWithAllocationPrice } + # @!attribute 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 :tiered_with_proration, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration } + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::ConversionRateConfig + }, + nil?: true - variant :unit_with_proration, -> { Orb::NewPlanUnitWithProrationPrice } + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true - variant :grouped_allocation, -> { Orb::NewPlanGroupedAllocationPrice } + # @!attribute dimensional_price_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 :bulk_with_proration, -> { Orb::NewPlanBulkWithProrationPrice } + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # 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_with_prorated_minimum, -> { Orb::NewPlanGroupedWithProratedMinimumPrice } + # @!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 :grouped_with_metered_minimum, -> { Orb::NewPlanGroupedWithMeteredMinimumPrice } + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are 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 :grouped_with_min_max_thresholds, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds } + # @!attribute 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 :matrix_with_display_name, -> { Orb::NewPlanMatrixWithDisplayNamePrice } + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can 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 :grouped_tiered_package, -> { Orb::NewPlanGroupedTieredPackagePrice } + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true - variant :max_group_tiered_package, -> { Orb::NewPlanMaxGroupTieredPackagePrice } + # @!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::ReplacePrice::Price::TieredWithProration} + # for more details. + # + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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 - variant :scalable_matrix_with_unit_pricing, -> { Orb::NewPlanScalableMatrixWithUnitPricingPrice } + # The cadence to bill for this price on. + # + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration#cadence + module Cadence + extend Orb::Internal::Type::Enum - variant :scalable_matrix_with_tiered_pricing, -> { Orb::NewPlanScalableMatrixWithTieredPricingPrice } + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom - variant :cumulative_grouped_bulk, -> { Orb::NewPlanCumulativeGroupedBulkPrice } + # @!method self.values + # @return [Array] + end - variant :cumulative_grouped_allocation, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation } + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] + end - variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice } + # @!method initialize(tiers:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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 - variant :percent, -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent } + class Tier < Orb::Internal::Type::BaseModel + # @!attribute tier_lower_bound + # Inclusive tier starting value + # + # @return [String] + required :tier_lower_bound, String - variant :event_output, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput } + # @!attribute unit_amount + # Amount per unit + # + # @return [String] + required :unit_amount, String - class BulkWithFilters < Orb::Internal::Type::BaseModel - # @!attribute bulk_with_filters_config - # Configuration for bulk_with_filters pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig] - required :bulk_with_filters_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig } + # @!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::ReplacePrice::Price::BulkWithFilters::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence } + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence } + + # @!attribute grouped_with_min_max_thresholds_config + # Configuration for grouped_with_min_max_thresholds pricing + # + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] + required :grouped_with_min_max_thresholds_config, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } # @!attribute item_id # The id of the item the price will be associated with. @@ -19243,8 +4118,8 @@ class BulkWithFilters < Orb::Internal::Type::BaseModel # @!attribute model_type # The pricing model type # - # @return [Symbol, :bulk_with_filters] - required :model_type, const: :bulk_with_filters + # @return [Symbol, :grouped_with_min_max_thresholds] + required :model_type, const: :grouped_with_min_max_thresholds # @!attribute name # The name of the price. @@ -19285,7 +4160,7 @@ class BulkWithFilters < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::ConversionRateConfig }, nil?: true @@ -19353,14 +4228,14 @@ 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:, 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::ReplacePrice::Price::BulkWithFilters} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds} # for more details. # - # @param bulk_with_filters_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence] The cadence to bill for this price on. + # @param grouped_with_min_max_thresholds_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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. # @@ -19394,85 +4269,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::ReplacePrice::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::ReplacePrice::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::ReplacePrice::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, :grouped_with_min_max_thresholds] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds#cadence module Cadence extend Orb::Internal::Type::Enum @@ -19486,15 +4287,60 @@ module Cadence # @!method self.values # @return [Array] end + + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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 TieredWithProration < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence } + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence } + + # @!attribute cumulative_grouped_allocation_config + # Configuration for cumulative_grouped_allocation pricing + # + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] + required :cumulative_grouped_allocation_config, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig } # @!attribute item_id # The id of the item the price will be associated with. @@ -19505,8 +4351,8 @@ class TieredWithProration < Orb::Internal::Type::BaseModel # @!attribute model_type # The pricing model type # - # @return [Symbol, :tiered_with_proration] - required :model_type, const: :tiered_with_proration + # @return [Symbol, :cumulative_grouped_allocation] + required :model_type, const: :cumulative_grouped_allocation # @!attribute name # The name of the price. @@ -19514,13 +4360,6 @@ class TieredWithProration < Orb::Internal::Type::BaseModel # @return [String] required :name, String - # @!attribute tiered_with_proration_config - # Configuration for tiered_with_proration pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig] - required :tiered_with_proration_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig } - # @!attribute billable_metric_id # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -19554,7 +4393,7 @@ class TieredWithProration < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::ConversionRateConfig }, nil?: true @@ -19622,19 +4461,19 @@ 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:, cumulative_grouped_allocation_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_allocation) # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation} # for more details. # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on. + # + # @param cumulative_grouped_allocation_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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 tiered_with_proration_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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 @@ -19663,11 +4502,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, :cumulative_grouped_allocation] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation#cadence module Cadence extend Orb::Internal::Type::Enum @@ -19682,66 +4521,59 @@ module Cadence # @return [Array] end - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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 + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation#cumulative_grouped_allocation_config + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + # @!attribute cumulative_allocation + # The overall allocation across all groups # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - end + # @return [String] + required :cumulative_allocation, String - # @!method initialize(tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig} - # for more details. - # - # Configuration for tiered_with_proration pricing + # @!attribute group_allocation + # The allocation per individual group # - # @param tiers [Array] Tiers for rating based on total usage quantities into the specified tier with pr + # @return [String] + required :group_allocation, String - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # Inclusive tier starting value - # - # @return [String] - required :tier_lower_bound, String + # @!attribute grouping_key + # The event property used to group usage before applying allocations + # + # @return [String] + required :grouping_key, String - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String + # @!attribute unit_amount + # The amount to charge for each unit outside of the allocation + # + # @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 + # @!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 GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence } + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence } - # @!attribute grouped_with_min_max_thresholds_config - # Configuration for grouped_with_min_max_thresholds pricing + # @!attribute daily_credit_allowance_config + # Configuration for daily_credit_allowance pricing # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] - required :grouped_with_min_max_thresholds_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] + required :daily_credit_allowance_config, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig } # @!attribute item_id # The id of the item the price will be associated with. @@ -19752,8 +4584,8 @@ class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @!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, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance # @!attribute name # The name of the price. @@ -19794,7 +4626,7 @@ class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::ConversionRateConfig }, nil?: true @@ -19862,14 +4694,14 @@ 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(cadence:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :daily_credit_allowance) # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance} # for more details. # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence] The cadence to bill for this price on. # - # @param grouped_with_min_max_thresholds_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing + # @param daily_credit_allowance_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing # # @param item_id [String] The id of the item the price will be associated with. # @@ -19903,11 +4735,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, :daily_credit_allowance] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance#cadence module Cadence extend Orb::Internal::Type::Enum @@ -19922,59 +4754,99 @@ module Cadence # @return [Array] end - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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 + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance#daily_credit_allowance_config + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute daily_allowance + # Credits granted per day. Lose-it-or-use-it; does not roll over. # # @return [String] - required :grouping_key, String + required :daily_allowance, String - # @!attribute maximum_charge - # The maximum amount to charge each group + # @!attribute default_unit_amount + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value # # @return [String] - required :maximum_charge, String + required :default_unit_amount, String - # @!attribute minimum_charge - # The minimum amount to charge each group, regardless of usage + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by # - # @return [String] - required :minimum_charge, String + # @return [Array] + required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true] - # @!attribute per_unit_rate - # The base price charged per group + # @!attribute event_day_property + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. # # @return [String] - required :per_unit_rate, String + required :event_day_property, String - # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:) - # Configuration for grouped_with_min_max_thresholds pricing + # @!attribute matrix_values + # Per-dimension credit rates # - # @param grouping_key [String] The event property used to group before applying thresholds + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + end + + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig} + # for more details. # - # @param maximum_charge [String] The maximum amount to charge each group + # Configuration for daily_credit_allowance pricing # - # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage + # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over. # - # @param per_unit_rate [String] The base price charged per group + # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified + # matrix\_ + # + # @param dimensions [Array] One or two event property values to evaluate matrix groups by + # + # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g. + # + # @param matrix_values [Array] Per-dimension credit rates + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + # + # @return [Array] + required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Credits charged per unit of usage matching the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!method initialize(dimension_values:, unit_amount:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue} + # for more details. + # + # Per-dimension credit price for the daily credit allowance model. + # + # @param dimension_values [Array] One or two matrix keys to filter usage to this value by. For example, ["model"] + # + # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values + end end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence } - - # @!attribute cumulative_grouped_allocation_config - # Configuration for cumulative_grouped_allocation pricing - # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] - required :cumulative_grouped_allocation_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig } + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -19982,11 +4854,18 @@ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing + # + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig } + # @!attribute model_type # The pricing model type # - # @return [Symbol, :cumulative_grouped_allocation] - required :model_type, const: :cumulative_grouped_allocation + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance # @!attribute name # The name of the price. @@ -20027,7 +4906,7 @@ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::ConversionRateConfig }, nil?: true @@ -20095,17 +4974,17 @@ 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:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :metered_allowance) # Some parameter documentations has been truncated, see - # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance} # for more details. # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on. - # - # @param cumulative_grouped_allocation_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # + # @param metered_allowance_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing + # # @param name [String] The name of the price. # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b @@ -20136,11 +5015,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, :metered_allowance] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance#cadence module Cadence extend Orb::Internal::Type::Enum @@ -20155,42 +5034,67 @@ module Cadence # @return [Array] end - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation#cumulative_grouped_allocation_config - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute cumulative_allocation - # The overall allocation across all groups + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance#metered_allowance_config + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute allowance_grouping_value + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. # # @return [String] - required :cumulative_allocation, String + required :allowance_grouping_value, String - # @!attribute group_allocation - # The allocation per individual group + # @!attribute consumption_grouping_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. # # @return [String] - required :group_allocation, String + required :consumption_grouping_value, String # @!attribute grouping_key - # The event property used to group usage before applying allocations + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. # # @return [String] required :grouping_key, String # @!attribute unit_amount - # The amount to charge for each unit outside of the allocation + # Per-unit price applied to gross consumption and to the allowance credit. # # @return [String] required :unit_amount, String - # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:) - # Configuration for cumulative_grouped_allocation pricing + # @!attribute allowance_display_name + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). # - # @param cumulative_allocation [String] The overall allocation across all groups + # @return [String, nil] + optional :allowance_display_name, String + + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). # - # @param group_allocation [String] The allocation per individual group + # @return [String, nil] + optional :consumption_display_name, String + + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig} + # for more details. # - # @param grouping_key [String] The event property used to group usage before applying allocations + # Configuration for metered_allowance pricing # - # @param unit_amount [String] The amount to charge for each unit outside of the allocation + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p + # + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl + # + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant + # + # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit. + # + # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten'). end end @@ -20636,7 +5540,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput)] end end end diff --git a/lib/orb/models/beta_create_plan_version_params.rb b/lib/orb/models/beta_create_plan_version_params.rb index 0e288ef2..7385a3af 100644 --- a/lib/orb/models/beta_create_plan_version_params.rb +++ b/lib/orb/models/beta_create_plan_version_params.rb @@ -144,9 +144,9 @@ class AddPrice < Orb::Internal::Type::BaseModel # @!attribute license_allocation_price # The license allocation price to add to the plan. # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput, nil] + # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice, nil] optional :license_allocation_price, - union: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice }, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice }, nil?: true # @!attribute plan_phase_order @@ -158,120 +158,357 @@ class AddPrice < Orb::Internal::Type::BaseModel # @!attribute price # New plan price request body params. # - # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] + # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] optional :price, union: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price }, nil?: true # @!method initialize(allocation_price: nil, license_allocation_price: nil, plan_phase_order: nil, price: nil) # @param allocation_price [Orb::Models::NewAllocationPrice, nil] The allocation price to add to the plan. # - # @param license_allocation_price [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput, nil] The license allocation price to add to the plan. + # @param license_allocation_price [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice, nil] The license allocation price to add to the plan. # # @param plan_phase_order [Integer, nil] The phase to add this price to. # - # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] New plan price request body params. + # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] New plan price request body params. - # The license allocation price to add to the plan. - # # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice#license_allocation_price - module LicenseAllocationPrice + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence] + required :cadence, + enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute license_allocations + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + # + # @return [Array] + required :license_allocations, + -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation] } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType] + required :model_type, + enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType } + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute unit_config + # Configuration for unit pricing + # + # @return [Orb::Models::UnitConfig] + required :unit_config, -> { Orb::UnitConfig } + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, license_allocations:, model_type:, name:, unit_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice} for + # more details. + # + # The license allocation price to add to the plan. + # + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # + # @param model_type [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType] The pricing model type + # + # @param name [String] The name of the price. + # + # @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + + # The cadence to bill for this price on. + # + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + class LicenseAllocation < Orb::Internal::Type::BaseModel + # @!attribute amount + # The amount of credits granted per active license per cadence. + # + # @return [String] + required :amount, String + + # @!attribute currency + # The currency of the license allocation. + # + # @return [String] + required :currency, String + + # @!attribute write_off_overage + # When True, overage beyond the allocation is written off. + # + # @return [Boolean, nil] + optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + + # @!method initialize(amount:, currency:, write_off_overage: nil) + # @param amount [String] The amount of credits granted per active license per cadence. + # + # @param currency [String] The currency of the license allocation. + # + # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + end + + # The pricing model type + # + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice#model_type + module ModelType + extend Orb::Internal::Type::Enum + + UNIT = :unit + + # @!method self.values + # @return [Array] + end + end + + # New plan price request body params. + # + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice#price + module Price extend Orb::Internal::Type::Union discriminator :model_type - variant :unit, -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit } + variant :unit, -> { Orb::NewPlanUnitPrice } + + variant :tiered, -> { Orb::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 :matrix_with_threshold_discounts, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts } variant :tiered_with_proration, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration } + -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration } - variant :unit_with_proration, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration } + variant :unit_with_proration, -> { Orb::NewPlanUnitWithProrationPrice } - variant :grouped_allocation, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation } + variant :grouped_allocation, -> { Orb::NewPlanGroupedAllocationPrice } - variant :bulk_with_proration, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration } + variant :bulk_with_proration, -> { Orb::NewPlanBulkWithProrationPrice } - variant :grouped_with_prorated_minimum, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum } + variant :grouped_with_prorated_minimum, -> { Orb::NewPlanGroupedWithProratedMinimumPrice } - variant :grouped_with_metered_minimum, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum } + variant :grouped_with_metered_minimum, -> { Orb::NewPlanGroupedWithMeteredMinimumPrice } variant :grouped_with_min_max_thresholds, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds } + -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds } - variant :matrix_with_display_name, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName } + variant :matrix_with_display_name, -> { Orb::NewPlanMatrixWithDisplayNamePrice } - variant :grouped_tiered_package, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage } + variant :grouped_tiered_package, -> { Orb::NewPlanGroupedTieredPackagePrice } - variant :max_group_tiered_package, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage } + variant :max_group_tiered_package, -> { Orb::NewPlanMaxGroupTieredPackagePrice } - variant :scalable_matrix_with_unit_pricing, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing } + variant :scalable_matrix_with_unit_pricing, -> { Orb::NewPlanScalableMatrixWithUnitPricingPrice } - variant :scalable_matrix_with_tiered_pricing, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing } + variant :scalable_matrix_with_tiered_pricing, -> { Orb::NewPlanScalableMatrixWithTieredPricingPrice } - variant :cumulative_grouped_bulk, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk } + variant :cumulative_grouped_bulk, -> { Orb::NewPlanCumulativeGroupedBulkPrice } variant :cumulative_grouped_allocation, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation } + -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation } + + variant :daily_credit_allowance, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance } - variant :minimum_composite, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite } + variant :metered_allowance, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance } - variant :percent, -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent } + variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice } + + variant :percent, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent } + + variant :event_output, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput } - variant :event_output, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput } + class BulkWithFilters < Orb::Internal::Type::BaseModel + # @!attribute bulk_with_filters_config + # Configuration for bulk_with_filters pricing + # + # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig] + required :bulk_with_filters_config, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig } - class Unit < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence] + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence] required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence } + enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -279,20 +516,11 @@ class Unit < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation] } - # @!attribute model_type # The pricing model type # - # @return [Symbol, :unit] - required :model_type, const: :unit + # @return [Symbol, :bulk_with_filters] + required :model_type, const: :bulk_with_filters # @!attribute name # The name of the price. @@ -300,12 +528,6 @@ class Unit < Orb::Internal::Type::BaseModel # @return [String] required :name, String - # @!attribute unit_config - # Configuration for unit pricing - # - # @return [Orb::Models::UnitConfig] - required :unit_config, -> { Orb::UnitConfig } - # @!attribute billable_metric_id # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -339,7 +561,7 @@ class Unit < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::ConversionRateConfig }, nil?: true @@ -407,21 +629,19 @@ class Unit < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit) + # @!method initialize(bulk_with_filters_config:, cadence:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_filters) # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit} - # for more details. + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters} for + # more details. # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence] The cadence to bill for this price on. + # @param bulk_with_filters_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing # - # @param item_id [String] The id of the item the price will be associated with. + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence] The cadence to bill for this price on. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # @param item_id [String] The id of the item the price will be associated with. # # @param name [String] The name of the price. # - # @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing - # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b # # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi @@ -450,11 +670,77 @@ class Unit < Orb::Internal::Type::BaseModel # # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments # - # @param model_type [Symbol, :unit] The pricing model type + # @param model_type [Symbol, :bulk_with_filters] The pricing model type + + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters#bulk_with_filters_config + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + # @!attribute filters + # Property filters to apply (all must match) + # + # @return [Array] + required :filters, + -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter] } + + # @!attribute tiers + # Bulk tiers for rating based on total usage volume + # + # @return [Array] + required :tiers, + -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] } + + # @!method initialize(filters:, tiers:) + # Configuration for bulk_with_filters pricing + # + # @param filters [Array] Property filters to apply (all must match) + # + # @param tiers [Array] Bulk tiers for rating based on total usage volume + + class Filter < Orb::Internal::Type::BaseModel + # @!attribute property_key + # Event property key to filter on + # + # @return [String] + required :property_key, String + + # @!attribute property_value + # Event property value to match + # + # @return [String] + required :property_value, String + + # @!method initialize(property_key:, property_value:) + # Configuration for a single property filter + # + # @param property_key [String] Event property key to filter on + # + # @param property_value [String] Event property value to match + end + + class Tier < Orb::Internal::Type::BaseModel + # @!attribute unit_amount + # Amount per unit + # + # @return [String] + required :unit_amount, String + + # @!attribute tier_lower_bound + # The lower bound for this tier + # + # @return [String, nil] + optional :tier_lower_bound, String, nil?: true + + # @!method initialize(unit_amount:, tier_lower_bound: nil) + # Configuration for a single bulk pricing tier + # + # @param unit_amount [String] Amount per unit + # + # @param tier_lower_bound [String, nil] The lower bound for this tier + end + end # The cadence to bill for this price on. # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters#cadence module Cadence extend Orb::Internal::Type::Enum @@ -468,42 +754,15 @@ module Cadence # @!method self.values # @return [Array] end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end end - class Tiered < Orb::Internal::Type::BaseModel + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence] + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence] required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence } + enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -511,20 +770,18 @@ class Tiered < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. + # @!attribute matrix_with_threshold_discounts_config + # Configuration for matrix_with_threshold_discounts pricing # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation] } + # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] + required :matrix_with_threshold_discounts_config, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig } # @!attribute model_type # The pricing model type # - # @return [Symbol, :tiered] - required :model_type, const: :tiered + # @return [Symbol, :matrix_with_threshold_discounts] + required :model_type, const: :matrix_with_threshold_discounts # @!attribute name # The name of the price. @@ -532,12 +789,6 @@ class Tiered < Orb::Internal::Type::BaseModel # @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. @@ -571,7 +822,7 @@ class Tiered < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::ConversionRateConfig }, nil?: true @@ -639,21 +890,19 @@ class Tiered < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered) + # @!method initialize(cadence:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_threshold_discounts) # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered} + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts} # for more details. # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # @param matrix_with_threshold_discounts_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing # # @param name [String] The name of the price. # - # @param 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 @@ -682,11 +931,11 @@ class Tiered < Orb::Internal::Type::BaseModel # # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments # - # @param model_type [Symbol, :tiered] The pricing model type + # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts#cadence module Cadence extend Orb::Internal::Type::Enum @@ -701,47 +950,139 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + # @!attribute default_unit_amount + # Unit price used for usage that does not match any defined matrix cell. # # @return [String] - required :amount, String + required :default_unit_amount, String - # @!attribute currency - # The currency of the license allocation. + # @!attribute first_dimension + # First matrix dimension key. # # @return [String] - required :currency, String + required :first_dimension, String + + # @!attribute matrix_values + # Per-cell unit prices. + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + end + + # @!attribute second_dimension + # Optional second matrix dimension key. + # + # @return [String, nil] + optional :second_dimension, String, nil?: true - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. + # @!attribute threshold_discount_groups # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @return [Array, nil] + optional :threshold_discount_groups, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + end - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. + # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil) + # Configuration for matrix_with_threshold_discounts pricing + # + # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell. + # + # @param first_dimension [String] First matrix dimension key. # - # @param currency [String] The currency of the license allocation. + # @param matrix_values [Array] Per-cell unit prices. # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + # @param second_dimension [String, nil] Optional second matrix dimension key. + # + # @param threshold_discount_groups [Array] + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute first_dimension_value + # + # @return [String] + required :first_dimension_value, String + + # @!attribute unit_amount + # + # @return [String] + required :unit_amount, String + + # @!attribute second_dimension_value + # + # @return [String, nil] + optional :second_dimension_value, String, nil?: true + + # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil) + # @param first_dimension_value [String] + # @param unit_amount [String] + # @param second_dimension_value [String, nil] + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + # @!attribute above_threshold_discount_percentage + # Discount rate applied to spend above the threshold. + # + # @return [String] + required :above_threshold_discount_percentage, String + + # @!attribute below_threshold_discount_percentage + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + # + # @return [String] + required :below_threshold_discount_percentage, String + + # @!attribute cell_coordinates + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + # + # @return [String] + required :cell_coordinates, String + + # @!attribute threshold_amount + # + # @return [String] + required :threshold_amount, String + + # @!attribute description + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup} + # for more details. + # + # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold. + # + # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli + # + # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # + # @param threshold_amount [String] + # + # @param description [String, nil] + end end end - class Bulk < Orb::Internal::Type::BaseModel - # @!attribute bulk_config - # Configuration for bulk pricing - # - # @return [Orb::Models::BulkConfig] - required :bulk_config, -> { Orb::BulkConfig } - + class TieredWithProration < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence] + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence] required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence } + enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -749,20 +1090,11 @@ class Bulk < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation] } - # @!attribute model_type # The pricing model type # - # @return [Symbol, :bulk] - required :model_type, const: :bulk + # @return [Symbol, :tiered_with_proration] + required :model_type, const: :tiered_with_proration # @!attribute name # The name of the price. @@ -770,6 +1102,13 @@ class Bulk < Orb::Internal::Type::BaseModel # @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. @@ -803,7 +1142,7 @@ class Bulk < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::ConversionRateConfig }, nil?: true @@ -871,21 +1210,19 @@ class Bulk < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(bulk_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk) + # @!method initialize(cadence:, item_id:, name:, tiered_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_proration) # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk} + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration} # for more details. # - # @param bulk_config [Orb::Models::BulkConfig] Configuration for bulk pricing - # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # # @param name [String] The name of the price. # + # @param tiered_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 @@ -914,11 +1251,11 @@ class Bulk < Orb::Internal::Type::BaseModel # # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments # - # @param model_type [Symbol, :bulk] The pricing model type + # @param model_type [Symbol, :tiered_with_proration] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration#cadence module Cadence extend Orb::Internal::Type::Enum @@ -933,48 +1270,62 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration#tiered_with_proration_config + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + # @!attribute tiers + # Tiers for rating based on total usage quantities into the specified tier with + # proration # - # @return [String] - required :amount, String + # @return [Array] + required :tiers, + -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] } - # @!attribute currency - # The currency of the license allocation. + # @!method initialize(tiers:) + # Some parameter documentations has been truncated, see + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig} + # for more details. # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. + # Configuration for tiered_with_proration pricing # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @param tiers [Array] Tiers for rating based on total usage quantities into the specified tier with pr - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + class Tier < Orb::Internal::Type::BaseModel + # @!attribute tier_lower_bound + # Inclusive tier starting value + # + # @return [String] + required :tier_lower_bound, String + + # @!attribute unit_amount + # Amount per unit + # + # @return [String] + required :unit_amount, String + + # @!method initialize(tier_lower_bound:, unit_amount:) + # Configuration for a single tiered with proration tier + # + # @param tier_lower_bound [String] Inclusive tier starting value + # + # @param unit_amount [String] Amount per unit + end end end - class 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 } - + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence] + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence] required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::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. @@ -982,20 +1333,11 @@ 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::BulkWithFilters::LicenseAllocation] } - # @!attribute model_type # The pricing model type # - # @return [Symbol, :bulk_with_filters] - required :model_type, const: :bulk_with_filters + # @return [Symbol, :grouped_with_min_max_thresholds] + required :model_type, const: :grouped_with_min_max_thresholds # @!attribute name # The name of the price. @@ -1036,7 +1378,7 @@ class BulkWithFilters < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::ConversionRateConfig }, nil?: true @@ -1104,19 +1446,17 @@ class BulkWithFilters < Orb::Internal::Type::BaseModel # @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) + # @!method initialize(cadence:, grouped_with_min_max_thresholds_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_min_max_thresholds) # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters} + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds} # 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::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence] The cadence to bill for this price on. + # @param grouped_with_min_max_thresholds_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # # @param name [String] The name of the price. # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b @@ -1147,85 +1487,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::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 + # @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::BulkWithFilters#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1240,41 +1506,59 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + # @!attribute grouping_key + # The event property used to group before applying thresholds + # + # @return [String] + required :grouping_key, String + + # @!attribute maximum_charge + # The maximum amount to charge each group # # @return [String] - required :amount, String + required :maximum_charge, String - # @!attribute currency - # The currency of the license allocation. + # @!attribute minimum_charge + # The minimum amount to charge each group, regardless of usage # # @return [String] - required :currency, String + required :minimum_charge, String - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. + # @!attribute per_unit_rate + # The base price charged per group # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @return [String] + required :per_unit_rate, String - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. + # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:) + # Configuration for grouped_with_min_max_thresholds pricing + # + # @param grouping_key [String] The event property used to group before applying thresholds # - # @param currency [String] The currency of the license allocation. + # @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 write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + # @param per_unit_rate [String] The base price charged per group end end - class Package < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence] + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence] required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::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. @@ -1282,20 +1566,11 @@ class Package < 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::Package::LicenseAllocation] } - # @!attribute model_type # The pricing model type # - # @return [Symbol, :package] - required :model_type, const: :package + # @return [Symbol, :cumulative_grouped_allocation] + required :model_type, const: :cumulative_grouped_allocation # @!attribute name # The name of the price. @@ -1303,12 +1578,6 @@ class Package < Orb::Internal::Type::BaseModel # @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. @@ -1342,7 +1611,7 @@ class Package < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::ConversionRateConfig }, nil?: true @@ -1410,21 +1679,19 @@ class Package < Orb::Internal::Type::BaseModel # @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) + # @!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::LicenseAllocationPrice::Package} + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation} # for more details. # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence] The cadence to bill for this price on. + # @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 license_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 @@ -1453,11 +1720,11 @@ class Package < 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, :package] The pricing model type + # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1472,41 +1739,59 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::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 :amount, String + required :group_allocation, String - # @!attribute currency - # The currency of the license allocation. + # @!attribute grouping_key + # The event property used to group usage before applying allocations # # @return [String] - required :currency, String + required :grouping_key, String - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. + # @!attribute unit_amount + # The amount to charge for each unit outside of the allocation # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @return [String] + required :unit_amount, String - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. + # @!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 currency [String] The currency of the license allocation. + # @param group_allocation [String] The allocation per individual group + # + # @param grouping_key [String] The event property used to group usage before applying allocations # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + # @param unit_amount [String] The amount to charge for each unit outside of the allocation end end - class Matrix < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence] + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence] required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence } + enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence } + + # @!attribute daily_credit_allowance_config + # Configuration for daily_credit_allowance pricing + # + # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] + required :daily_credit_allowance_config, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig } # @!attribute item_id # The id of the item the price will be associated with. @@ -1514,26 +1799,11 @@ class Matrix < 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::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 + # @return [Symbol, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance # @!attribute name # The name of the price. @@ -1574,7 +1844,7 @@ class Matrix < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::ConversionRateConfig }, nil?: true @@ -1642,18 +1912,16 @@ class Matrix < Orb::Internal::Type::BaseModel # @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) + # @!method initialize(cadence:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :daily_credit_allowance) # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix} + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance} # 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 cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence] The cadence to bill for this price on. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # @param daily_credit_allowance_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing # - # @param matrix_config [Orb::Models::MatrixConfig] Configuration for matrix pricing + # @param item_id [String] The id of the item the price will be associated with. # # @param name [String] The name of the price. # @@ -1685,11 +1953,11 @@ class Matrix < 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, :matrix] The pricing model type + # @param model_type [Symbol, :daily_credit_allowance] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1704,41 +1972,99 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance#daily_credit_allowance_config + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute daily_allowance + # Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @return [String] + required :daily_allowance, String + + # @!attribute default_unit_amount + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value # # @return [String] - required :amount, String + required :default_unit_amount, String - # @!attribute currency - # The currency of the license allocation. + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute event_day_property + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. # # @return [String] - required :currency, String + required :event_day_property, String - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. + # @!attribute matrix_values + # Per-dimension credit rates # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + end - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig} + # for more details. + # + # Configuration for daily_credit_allowance pricing + # + # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified + # matrix\_ + # + # @param dimensions [Array] One or two event property values to evaluate matrix groups by # - # @param currency [String] The currency of the license allocation. + # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g. # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + # @param matrix_values [Array] Per-dimension credit rates + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + # + # @return [Array] + required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Credits charged per unit of usage matching the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!method initialize(dimension_values:, unit_amount:) + # Some parameter documentations has been truncated, see + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue} + # for more details. + # + # Per-dimension credit price for the daily credit allowance model. + # + # @param dimension_values [Array] One or two matrix keys to filter usage to this value by. For example, ["model"] + # + # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values + end end end - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence] + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence] required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence } + enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -1746,24 +2072,18 @@ class ThresholdTotalAmount < 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. + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ] - end + # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig } # @!attribute model_type # The pricing model type # - # @return [Symbol, :threshold_total_amount] - required :model_type, const: :threshold_total_amount + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance # @!attribute name # The name of the price. @@ -1771,13 +2091,6 @@ class ThresholdTotalAmount < Orb::Internal::Type::BaseModel # @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. @@ -1811,7 +2124,7 @@ class ThresholdTotalAmount < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::ConversionRateConfig }, nil?: true @@ -1879,21 +2192,19 @@ class ThresholdTotalAmount < Orb::Internal::Type::BaseModel # @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) + # @!method initialize(cadence:, item_id:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :metered_allowance) # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount} + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance} # for more details. # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # @param metered_allowance_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing # # @param name [String] The name of the price. # - # @param 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 @@ -1922,11 +2233,11 @@ class ThresholdTotalAmount < 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, :threshold_total_amount] The pricing model type + # @param model_type [Symbol, :metered_allowance] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1941,93 +2252,76 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance#metered_allowance_config + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute allowance_grouping_value + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. # # @return [String] - required :amount, String + required :allowance_grouping_value, String - # @!attribute currency - # The currency of the license allocation. + # @!attribute consumption_grouping_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. # # @return [String] - required :currency, String + required :consumption_grouping_value, String - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. + # @!attribute grouping_key + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @return [String] + required :grouping_key, String - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. + # @!attribute unit_amount + # Per-unit price applied to gross consumption and to the allowance credit. # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end + # @return [String] + required :unit_amount, String - # @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 + # @!attribute allowance_display_name + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). # - # @return [Array] - required :consumption_table, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ] - end + # @return [String, nil] + optional :allowance_display_name, String - # @!attribute prorate - # If true, the unit price will be prorated to the billing period + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). # - # @return [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean, nil?: true + # @return [String, nil] + optional :consumption_display_name, String - # @!method initialize(consumption_table:, prorate: nil) + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig} + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig} # for more details. # - # Configuration for threshold_total_amount pricing + # Configuration for metered_allowance pricing # - # @param consumption_table [Array] When the quantity consumed passes a provided threshold, the configured total wil + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p # - # @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 + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl + # + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant + # + # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit. + # + # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten'). end end - class TieredPackage < Orb::Internal::Type::BaseModel + class Percent < 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 } + # @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. @@ -2035,20 +2329,11 @@ class TieredPackage < 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::TieredPackage::LicenseAllocation] } - # @!attribute model_type # The pricing model type # - # @return [Symbol, :tiered_package] - required :model_type, const: :tiered_package + # @return [Symbol, :percent] + required :model_type, const: :percent # @!attribute name # The name of the price. @@ -2056,12 +2341,11 @@ class TieredPackage < Orb::Internal::Type::BaseModel # @return [String] required :name, String - # @!attribute tiered_package_config - # Configuration for tiered_package pricing + # @!attribute percent_config + # Configuration for percent pricing # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig] - required :tiered_package_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig } + # @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 @@ -2096,7 +2380,7 @@ class TieredPackage < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::ConversionRateConfig }, nil?: true @@ -2164,20 +2448,18 @@ class TieredPackage < Orb::Internal::Type::BaseModel # @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) + # @!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::LicenseAllocationPrice::TieredPackage} - # for more details. + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent} for more + # details. # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # # @param name [String] The name of the price. # - # @param tiered_package_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig] Configuration for tiered_package pricing + # @param percent_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig] Configuration for percent pricing # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b # @@ -2207,11 +2489,11 @@ class TieredPackage < 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_package] The pricing model type + # @param model_type [Symbol, :percent] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent#cadence module Cadence extend Orb::Internal::Type::Enum @@ -2226,94 +2508,34 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::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. + # @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 [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - end + # @return [Float] + required :percent, Float - # @!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] + # @!method initialize(percent:) + # Configuration for percent pricing # - # @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 + # @param percent [Float] What percent of the component subtotals to charge end end - class TieredWithMinimum < Orb::Internal::Type::BaseModel + class EventOutput < 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 } + # @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. @@ -2321,20 +2543,11 @@ class TieredWithMinimum < 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::TieredWithMinimum::LicenseAllocation] } - # @!attribute model_type # The pricing model type # - # @return [Symbol, :tiered_with_minimum] - required :model_type, const: :tiered_with_minimum + # @return [Symbol, :event_output] + required :model_type, const: :event_output # @!attribute name # The name of the price. @@ -2342,13 +2555,6 @@ class TieredWithMinimum < Orb::Internal::Type::BaseModel # @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. @@ -2382,7 +2588,7 @@ class TieredWithMinimum < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::ConversionRateConfig }, nil?: true @@ -2450,21 +2656,19 @@ class TieredWithMinimum < Orb::Internal::Type::BaseModel # @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) + # @!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::LicenseAllocationPrice::TieredWithMinimum} - # for more details. + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput} for + # more details. # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence] The cadence to bill for this price on. # - # @param item_id [String] The id of the item the price will be associated with. + # @param event_output_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig] Configuration for event_output pricing # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # @param item_id [String] The id of the item the price will be associated with. # # @param name [String] The name of the price. # - # @param 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 @@ -2493,11 +2697,11 @@ class TieredWithMinimum < 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_minimum] The pricing model type + # @param model_type [Symbol, :event_output] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput#cadence module Cadence extend Orb::Internal::Type::Enum @@ -2512,15701 +2716,519 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. + # @see Orb::Models::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 :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param 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 + required :unit_rating_key, String - # @!attribute hide_zero_amount_tiers - # If true, tiers with an accrued amount of 0 will not be included in the rating. + # @!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 [Boolean, nil] - optional :hide_zero_amount_tiers, Orb::Internal::Type::Boolean + # @return [String, nil] + optional :default_unit_rate, String, nil?: true - # @!attribute prorate - # If true, the unit price will be prorated to the billing period + # @!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 [Boolean, nil] - optional :prorate, Orb::Internal::Type::Boolean + # @return [String, nil] + optional :grouping_key, String, nil?: true - # @!method initialize(tiers:, hide_zero_amount_tiers: nil, prorate: nil) + # @!method initialize(unit_rating_key:, default_unit_rate: nil, grouping_key: nil) # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig} + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig} # for more details. # - # Configuration for tiered_with_minimum pricing + # Configuration for event_output pricing # - # @param tiers [Array] Tiered pricing with a minimum amount dependent on the volume tier. Tiers are def + # @param unit_rating_key [String] The key in the event data to extract the unit rate from. # - # @param hide_zero_amount_tiers [Boolean] If true, tiers with an accrued amount of 0 will not be included in the rating. + # @param default_unit_rate [String, nil] If provided, this amount will be used as the unit rate when an event does not ha # - # @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 + # @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 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 } + # @!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::MatrixWithThresholdDiscounts, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput)] + end + end - # @!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 } + 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 item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String + # @!attribute plan_phase_order + # The phase to remove this adjustment from. + # + # @return [Integer, nil] + optional :plan_phase_order, Integer, nil?: true - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines 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] } + # @!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 - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, :grouped_tiered] - required :model_type, const: :grouped_tiered + 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 name - # The name of the price. - # - # @return [String] - required :name, String + # @!attribute plan_phase_order + # The phase to remove this price from. + # + # @return [Integer, nil] + optional :plan_phase_order, Integer, nil?: true - # @!attribute billable_metric_id - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - # - # @return [String, nil] - optional :billable_metric_id, String, 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 - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + 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 billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true - - # @!attribute conversion_rate_config - # The configuration for 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 replaces_adjustment_id + # The id of the adjustment on the plan to replace in the plan. + # + # @return [String] + required :replaces_adjustment_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 - # by setting `metadata` to `null`. - # - # @return [Hash{Symbol=>String, nil}, nil] - optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + # @!attribute plan_phase_order + # The phase to replace this adjustment from. + # + # @return [Integer, nil] + optional :plan_phase_order, Integer, nil?: true - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, 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. - # @!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 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 - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk#cadence - module Cadence - extend Orb::Internal::Type::Enum + discriminator :adjustment_type - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom + variant :percentage_discount, -> { Orb::NewPercentageDiscount } - # @!method self.values - # @return [Array] - end + variant :usage_discount, -> { Orb::NewUsageDiscount } - # @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 + variant :amount_discount, -> { Orb::NewAmountDiscount } - # @!attribute group - # - # @return [String] - required :group, String + variant :minimum, -> { Orb::NewMinimum } - # @!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] + variant :maximum, -> { Orb::NewMaximum } - class DimensionValue < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # Grouping key value - # - # @return [String] - required :grouping_key, String + # @!method self.variants + # @return [Array(Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum)] + end + end - # @!attribute tier_lower_bound - # Tier lower bound - # - # @return [String] - required :tier_lower_bound, String + 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 unit_amount - # Unit amount for this combination - # - # @return [String] - required :unit_amount, String + # @!attribute allocation_price + # The allocation price to add to the plan. + # + # @return [Orb::Models::NewAllocationPrice, nil] + optional :allocation_price, -> { Orb::NewAllocationPrice }, nil?: true - # @!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 + # @!attribute license_allocation_price + # The license allocation price to add to the plan. + # + # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice, nil] + optional :license_allocation_price, + -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice }, + nil?: true - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String + # @!attribute plan_phase_order + # The phase to replace this price from. + # + # @return [Integer, nil] + optional :plan_phase_order, Integer, nil?: true - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String + # @!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::MatrixWithThresholdDiscounts, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] + optional :price, union: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price }, nil?: true - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @!method initialize(replaces_price_id:, allocation_price: nil, license_allocation_price: nil, plan_phase_order: nil, price: nil) + # @param replaces_price_id [String] The id of the price on the plan to replace in the plan. + # + # @param allocation_price [Orb::Models::NewAllocationPrice, nil] The allocation price to add to the plan. + # + # @param license_allocation_price [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice, nil] The license allocation price to add to the plan. + # + # @param plan_phase_order [Integer, nil] The phase to replace this price from. + # + # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] New plan price request body params. - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param 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#license_allocation_price + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence] + required :cadence, + enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute license_allocations + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + # + # @return [Array] + required :license_allocations, + -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation] } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType] + required :model_type, + enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType } + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute unit_config + # Configuration for unit pricing + # + # @return [Orb::Models::UnitConfig] + required :unit_config, -> { Orb::UnitConfig } + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, license_allocations:, model_type:, name:, unit_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice} + # for more details. + # + # The license allocation price to add to the plan. + # + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # + # @param model_type [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType] The pricing model type + # + # @param name [String] The name of the price. + # + # @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + + # The cadence to bill for this price on. + # + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] end - class 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 + class LicenseAllocation < Orb::Internal::Type::BaseModel + # @!attribute amount + # The amount of credits granted per active license per cadence. # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] - required :cumulative_grouped_allocation_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig } + # @return [String] + required :amount, String - # @!attribute item_id - # The id of the item the price will be associated with. + # @!attribute currency + # The currency of the license allocation. # # @return [String] - required :item_id, String + required :currency, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. + # @!attribute write_off_overage + # When True, overage beyond the allocation is written off. # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ] - end + # @return [Boolean, nil] + optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - # @!attribute model_type - # The pricing model type + # @!method initialize(amount:, currency:, write_off_overage: nil) + # @param amount [String] The amount of credits granted per active license per cadence. # - # @return [Symbol, :cumulative_grouped_allocation] - required :model_type, const: :cumulative_grouped_allocation - - # @!attribute name - # The name of the price. + # @param currency [String] The currency of the license allocation. # - # @return [String] - required :name, String + # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + 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 + # The pricing model type + # + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice#model_type + module ModelType + extend Orb::Internal::Type::Enum - # @!attribute billed_in_advance - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - # - # @return [Boolean, nil] - optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + UNIT = :unit - # @!attribute billing_cycle_configuration - # For custom cadence: specifies the duration of the billing period in days or - # months. - # - # @return [Orb::Models::NewBillingCycleConfiguration, nil] - optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + # @!method self.values + # @return [Array] + end + end - # @!attribute conversion_rate - # The per unit conversion rate of the price currency to the invoicing currency. - # - # @return [Float, nil] - optional :conversion_rate, Float, nil?: true + # New plan price request body params. + # + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice#price + module Price + extend Orb::Internal::Type::Union - # @!attribute conversion_rate_config - # The configuration for 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 + discriminator :model_type - # @!attribute currency - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - # - # @return [String, nil] - optional :currency, String, nil?: true + variant :unit, -> { Orb::NewPlanUnitPrice } - # @!attribute dimensional_price_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, -> { Orb::NewPlanTieredPrice } - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true + variant :bulk, -> { Orb::NewPlanBulkPrice } - # @!attribute fixed_price_quantity - # 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 :bulk_with_filters, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters } - # @!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 :package, -> { Orb::NewPlanPackagePrice } - # @!attribute invoicing_cycle_configuration - # Within each billing cycle, specifies the cadence at which invoices are 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 :matrix, -> { Orb::NewPlanMatrixPrice } - # @!attribute 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 :threshold_total_amount, -> { Orb::NewPlanThresholdTotalAmountPrice } - # @!attribute metadata - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can 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 :tiered_package, -> { Orb::NewPlanTieredPackagePrice } - # @!attribute reference_id - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - # - # @return [String, nil] - optional :reference_id, String, nil?: true + variant :tiered_with_minimum, -> { Orb::NewPlanTieredWithMinimumPrice } - # @!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 + variant :grouped_tiered, -> { Orb::NewPlanGroupedTieredPrice } - # The cadence to bill for this price on. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation#cadence - module Cadence - extend Orb::Internal::Type::Enum + variant :tiered_package_with_minimum, -> { Orb::NewPlanTieredPackageWithMinimumPrice } - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom + variant :package_with_allocation, -> { Orb::NewPlanPackageWithAllocationPrice } - # @!method self.values - # @return [Array] - end + variant :unit_with_percent, -> { Orb::NewPlanUnitWithPercentPrice } - # @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 + variant :matrix_with_allocation, -> { Orb::NewPlanMatrixWithAllocationPrice } - # @!attribute group_allocation - # The allocation per individual group - # - # @return [String] - required :group_allocation, String + variant :matrix_with_threshold_discounts, + -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts } + + variant :tiered_with_proration, + -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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 } - # @!attribute grouping_key - # The event property used to group usage before applying allocations - # - # @return [String] - required :grouping_key, String + variant :scalable_matrix_with_tiered_pricing, -> { Orb::NewPlanScalableMatrixWithTieredPricingPrice } - # @!attribute unit_amount - # The amount to charge for each unit outside of the allocation - # - # @return [String] - required :unit_amount, String + variant :cumulative_grouped_bulk, -> { Orb::NewPlanCumulativeGroupedBulkPrice } - # @!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 + variant :cumulative_grouped_allocation, + -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation } - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String + variant :daily_credit_allowance, + -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance } - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String + variant :metered_allowance, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance } - # @!attribute write_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 :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice } - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param 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 + variant :percent, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent } + + variant :event_output, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput } + + class BulkWithFilters < Orb::Internal::Type::BaseModel + # @!attribute bulk_with_filters_config + # Configuration for bulk_with_filters pricing + # + # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig] + required :bulk_with_filters_config, + -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig } - class MinimumComposite < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence] + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence] required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence } + enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -18214,31 +3236,11 @@ class MinimumComposite < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ] - end - - # @!attribute minimum_composite_config - # Configuration for minimum_composite pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig] - required :minimum_composite_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig } - # @!attribute model_type # The pricing model type # - # @return [Symbol, :minimum_composite] - required :model_type, const: :minimum_composite + # @return [Symbol, :bulk_with_filters] + required :model_type, const: :bulk_with_filters # @!attribute name # The name of the price. @@ -18279,7 +3281,7 @@ class MinimumComposite < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::ConversionRateConfig }, nil?: true @@ -18347,18 +3349,16 @@ class MinimumComposite < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(cadence:, item_id:, license_allocations:, minimum_composite_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :minimum_composite) + # @!method initialize(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::ReplacePrice::LicenseAllocationPrice::MinimumComposite} + # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters} # for more details. # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence] The cadence to bill for this price on. - # - # @param item_id [String] The id of the item the price will be associated with. + # @param bulk_with_filters_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence] The cadence to bill for this price on. # - # @param minimum_composite_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig] Configuration for minimum_composite pricing + # @param item_id [String] The id of the item the price will be associated with. # # @param name [String] The name of the price. # @@ -18390,11 +3390,77 @@ class MinimumComposite < Orb::Internal::Type::BaseModel # # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments # - # @param model_type [Symbol, :minimum_composite] The pricing model type + # @param model_type [Symbol, :bulk_with_filters] The pricing model type + + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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::ReplacePrice::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::ReplacePrice::LicenseAllocationPrice::MinimumComposite#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters#cadence module Cadence extend Orb::Internal::Type::Enum @@ -18408,64 +3474,15 @@ module Cadence # @!method self.values # @return [Array] end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end - - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::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 + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence] + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence] required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence } + enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -18473,20 +3490,18 @@ 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. + # @!attribute matrix_with_threshold_discounts_config + # Configuration for matrix_with_threshold_discounts pricing # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation] } + # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] + required :matrix_with_threshold_discounts_config, + -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig } # @!attribute model_type # The pricing model type # - # @return [Symbol, :percent] - required :model_type, const: :percent + # @return [Symbol, :matrix_with_threshold_discounts] + required :model_type, const: :matrix_with_threshold_discounts # @!attribute name # The name of the price. @@ -18494,13 +3509,6 @@ class Percent < Orb::Internal::Type::BaseModel # @return [String] required :name, String - # @!attribute percent_config - # Configuration for percent pricing - # - # @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 # usage-based. @@ -18534,7 +3542,7 @@ class Percent < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::ConversionRateConfig }, nil?: true @@ -18602,21 +3610,19 @@ class Percent < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(cadence:, item_id:, license_allocations:, name:, percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :percent) + # @!method initialize(cadence:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_threshold_discounts) # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent} + # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts} # for more details. # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # @param matrix_with_threshold_discounts_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing # # @param name [String] The name of the price. # - # @param 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 # # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi @@ -18645,11 +3651,11 @@ class Percent < 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, :percent] The pricing model type + # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts#cadence module Cadence extend Orb::Internal::Type::Enum @@ -18664,62 +3670,139 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + # @!attribute default_unit_amount + # Unit price used for usage that does not match any defined matrix cell. # # @return [String] - required :amount, String + required :default_unit_amount, String - # @!attribute currency - # The currency of the license allocation. + # @!attribute first_dimension + # First matrix dimension key. # # @return [String] - required :currency, String + required :first_dimension, String - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. + # @!attribute matrix_values + # Per-cell unit prices. # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + 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. + # @!attribute second_dimension + # Optional second matrix dimension key. # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end + # @return [String, nil] + optional :second_dimension, String, nil?: true - # @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 + # @!attribute threshold_discount_groups # - # @return [Float] - required :percent, Float + # @return [Array, nil] + optional :threshold_discount_groups, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + end - # @!method initialize(percent:) - # Configuration for percent pricing + # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil) + # Configuration for matrix_with_threshold_discounts pricing # - # @param percent [Float] What percent of the component subtotals to charge + # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell. + # + # @param first_dimension [String] First matrix dimension key. + # + # @param matrix_values [Array] Per-cell unit prices. + # + # @param second_dimension [String, nil] Optional second matrix dimension key. + # + # @param threshold_discount_groups [Array] + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute first_dimension_value + # + # @return [String] + required :first_dimension_value, String + + # @!attribute unit_amount + # + # @return [String] + required :unit_amount, String + + # @!attribute second_dimension_value + # + # @return [String, nil] + optional :second_dimension_value, String, nil?: true + + # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil) + # @param first_dimension_value [String] + # @param unit_amount [String] + # @param second_dimension_value [String, nil] + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + # @!attribute above_threshold_discount_percentage + # Discount rate applied to spend above the threshold. + # + # @return [String] + required :above_threshold_discount_percentage, String + + # @!attribute below_threshold_discount_percentage + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + # + # @return [String] + required :below_threshold_discount_percentage, String + + # @!attribute cell_coordinates + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + # + # @return [String] + required :cell_coordinates, String + + # @!attribute threshold_amount + # + # @return [String] + required :threshold_amount, String + + # @!attribute description + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup} + # for more details. + # + # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold. + # + # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli + # + # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # + # @param threshold_amount [String] + # + # @param description [String, nil] + end end end - class EventOutput < Orb::Internal::Type::BaseModel + class TieredWithProration < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence] + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence] required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence } - - # @!attribute event_output_config - # Configuration for event_output pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig] - required :event_output_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig } + enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -18727,20 +3810,11 @@ 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 # - # @return [Symbol, :event_output] - required :model_type, const: :event_output + # @return [Symbol, :tiered_with_proration] + required :model_type, const: :tiered_with_proration # @!attribute name # The name of the price. @@ -18748,6 +3822,13 @@ class EventOutput < Orb::Internal::Type::BaseModel # @return [String] required :name, String + # @!attribute tiered_with_proration_config + # Configuration for tiered_with_proration pricing + # + # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig] + required :tiered_with_proration_config, + -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig } + # @!attribute billable_metric_id # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -18781,7 +3862,7 @@ class EventOutput < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::ConversionRateConfig }, nil?: true @@ -18849,21 +3930,19 @@ class EventOutput < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(cadence:, event_output_config:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :event_output) + # @!method initialize(cadence:, 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::ReplacePrice::LicenseAllocationPrice::EventOutput} + # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration} # for more details. # - # @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::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig] Configuration for event_output pricing + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # # @param name [String] The name of the price. # + # @param tiered_with_proration_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::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 @@ -18892,11 +3971,11 @@ class EventOutput < 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, :event_output] The pricing model type + # @param model_type [Symbol, :tiered_with_proration] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration#cadence module Cadence extend Orb::Internal::Type::Enum @@ -18911,162 +3990,66 @@ module Cadence # @return [Array] end - # @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. - # - # @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. + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration#tiered_with_proration_config + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + # @!attribute tiers + # Tiers for rating based on total usage quantities into the specified tier with + # proration # - # @return [String, nil] - optional :grouping_key, String, nil?: true + # @return [Array] + required :tiers, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] + end - # @!method initialize(unit_rating_key:, default_unit_rate: nil, grouping_key: nil) + # @!method initialize(tiers:) # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig} + # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig} # 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. + # Configuration for tiered_with_proration pricing # - # @return [String] - required :amount, String + # @param tiers [Array] Tiers for rating based on total usage quantities into the specified tier with pr - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String + class Tier < Orb::Internal::Type::BaseModel + # @!attribute tier_lower_bound + # Inclusive tier starting value + # + # @return [String] + required :tier_lower_bound, String - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @!attribute unit_amount + # Amount per unit + # + # @return [String] + required :unit_amount, String - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + # @!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 - # @!method self.variants - # @return [Array(Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput)] - end - - # New plan price request body params. - # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice#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::ReplacePrice::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::ReplacePrice::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::ReplacePrice::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::ReplacePrice::Price::CumulativeGroupedAllocation } - - variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice } - - variant :percent, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent } - - variant :event_output, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput } - - class BulkWithFilters < Orb::Internal::Type::BaseModel - # @!attribute bulk_with_filters_config - # Configuration for bulk_with_filters pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig] - required :bulk_with_filters_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig } - + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence] + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence] required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence } + enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence } + + # @!attribute grouped_with_min_max_thresholds_config + # Configuration for grouped_with_min_max_thresholds pricing + # + # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] + required :grouped_with_min_max_thresholds_config, + -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } # @!attribute item_id # The id of the item the price will be associated with. @@ -19077,8 +4060,8 @@ class BulkWithFilters < Orb::Internal::Type::BaseModel # @!attribute model_type # The pricing model type # - # @return [Symbol, :bulk_with_filters] - required :model_type, const: :bulk_with_filters + # @return [Symbol, :grouped_with_min_max_thresholds] + required :model_type, const: :grouped_with_min_max_thresholds # @!attribute name # The name of the price. @@ -19119,7 +4102,7 @@ class BulkWithFilters < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::ConversionRateConfig }, nil?: true @@ -19187,14 +4170,14 @@ 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:, 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::ReplacePrice::Price::BulkWithFilters} + # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds} # for more details. # - # @param bulk_with_filters_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence] The cadence to bill for this price on. + # @param grouped_with_min_max_thresholds_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::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. # @@ -19228,77 +4211,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::ReplacePrice::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::ReplacePrice::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::ReplacePrice::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, :grouped_with_min_max_thresholds] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds#cadence module Cadence extend Orb::Internal::Type::Enum @@ -19312,15 +4229,60 @@ module Cadence # @!method self.values # @return [Array] end + + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::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 TieredWithProration < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence] + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence] required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence } + enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence } + + # @!attribute cumulative_grouped_allocation_config + # Configuration for cumulative_grouped_allocation pricing + # + # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] + required :cumulative_grouped_allocation_config, + -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig } # @!attribute item_id # The id of the item the price will be associated with. @@ -19331,8 +4293,8 @@ class TieredWithProration < Orb::Internal::Type::BaseModel # @!attribute model_type # The pricing model type # - # @return [Symbol, :tiered_with_proration] - required :model_type, const: :tiered_with_proration + # @return [Symbol, :cumulative_grouped_allocation] + required :model_type, const: :cumulative_grouped_allocation # @!attribute name # The name of the price. @@ -19340,13 +4302,6 @@ class TieredWithProration < Orb::Internal::Type::BaseModel # @return [String] required :name, String - # @!attribute tiered_with_proration_config - # Configuration for tiered_with_proration pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig] - required :tiered_with_proration_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig } - # @!attribute billable_metric_id # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -19380,7 +4335,7 @@ class TieredWithProration < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::ConversionRateConfig }, nil?: true @@ -19448,19 +4403,19 @@ 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:, cumulative_grouped_allocation_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_allocation) # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration} + # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation} # for more details. # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on. + # + # @param cumulative_grouped_allocation_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::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 tiered_with_proration_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::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 @@ -19489,11 +4444,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, :cumulative_grouped_allocation] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation#cadence module Cadence extend Orb::Internal::Type::Enum @@ -19508,66 +4463,59 @@ module Cadence # @return [Array] end - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::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 + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation#cumulative_grouped_allocation_config + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + # @!attribute cumulative_allocation + # The overall allocation across all groups # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - end + # @return [String] + required :cumulative_allocation, String - # @!method initialize(tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig} - # for more details. - # - # Configuration for tiered_with_proration pricing + # @!attribute group_allocation + # The allocation per individual group # - # @param tiers [Array] Tiers for rating based on total usage quantities into the specified tier with pr + # @return [String] + required :group_allocation, String - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # Inclusive tier starting value - # - # @return [String] - required :tier_lower_bound, String + # @!attribute grouping_key + # The event property used to group usage before applying allocations + # + # @return [String] + required :grouping_key, String - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String + # @!attribute unit_amount + # The amount to charge for each unit outside of the allocation + # + # @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 + # @!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 GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence] + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence] required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence } + enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence } - # @!attribute grouped_with_min_max_thresholds_config - # Configuration for grouped_with_min_max_thresholds pricing + # @!attribute daily_credit_allowance_config + # Configuration for daily_credit_allowance pricing # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] - required :grouped_with_min_max_thresholds_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } + # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] + required :daily_credit_allowance_config, + -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig } # @!attribute item_id # The id of the item the price will be associated with. @@ -19578,8 +4526,8 @@ class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @!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, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance # @!attribute name # The name of the price. @@ -19620,7 +4568,7 @@ class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::ConversionRateConfig }, nil?: true @@ -19688,14 +4636,14 @@ 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(cadence:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :daily_credit_allowance) # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds} + # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance} # for more details. # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence] The cadence to bill for this price on. # - # @param grouped_with_min_max_thresholds_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing + # @param daily_credit_allowance_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing # # @param item_id [String] The id of the item the price will be associated with. # @@ -19729,11 +4677,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, :daily_credit_allowance] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance#cadence module Cadence extend Orb::Internal::Type::Enum @@ -19748,59 +4696,99 @@ module Cadence # @return [Array] end - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::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 + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance#daily_credit_allowance_config + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute daily_allowance + # Credits granted per day. Lose-it-or-use-it; does not roll over. # # @return [String] - required :grouping_key, String + required :daily_allowance, String - # @!attribute maximum_charge - # The maximum amount to charge each group + # @!attribute default_unit_amount + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value # # @return [String] - required :maximum_charge, String + required :default_unit_amount, String - # @!attribute minimum_charge - # The minimum amount to charge each group, regardless of usage + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by # - # @return [String] - required :minimum_charge, String + # @return [Array] + required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true] - # @!attribute per_unit_rate - # The base price charged per group + # @!attribute event_day_property + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. # # @return [String] - required :per_unit_rate, String + required :event_day_property, String - # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:) - # Configuration for grouped_with_min_max_thresholds pricing + # @!attribute matrix_values + # Per-dimension credit rates # - # @param grouping_key [String] The event property used to group before applying thresholds + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + end + + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig} + # for more details. # - # @param maximum_charge [String] The maximum amount to charge each group + # Configuration for daily_credit_allowance pricing # - # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage + # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over. # - # @param per_unit_rate [String] The base price charged per group + # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified + # matrix\_ + # + # @param dimensions [Array] One or two event property values to evaluate matrix groups by + # + # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g. + # + # @param matrix_values [Array] Per-dimension credit rates + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + # + # @return [Array] + required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Credits charged per unit of usage matching the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!method initialize(dimension_values:, unit_amount:) + # Some parameter documentations has been truncated, see + # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue} + # for more details. + # + # Per-dimension credit price for the daily credit allowance model. + # + # @param dimension_values [Array] One or two matrix keys to filter usage to this value by. For example, ["model"] + # + # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values + end end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence] + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence] required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence } - - # @!attribute cumulative_grouped_allocation_config - # Configuration for cumulative_grouped_allocation pricing - # - # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] - required :cumulative_grouped_allocation_config, - -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig } + enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -19808,11 +4796,18 @@ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing + # + # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, + -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig } + # @!attribute model_type # The pricing model type # - # @return [Symbol, :cumulative_grouped_allocation] - required :model_type, const: :cumulative_grouped_allocation + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance # @!attribute name # The name of the price. @@ -19853,7 +4848,7 @@ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::ConversionRateConfig }, nil?: true @@ -19921,17 +4916,17 @@ 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:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :metered_allowance) # Some parameter documentations has been truncated, see - # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation} + # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance} # for more details. # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on. - # - # @param cumulative_grouped_allocation_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # + # @param metered_allowance_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing + # # @param name [String] The name of the price. # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b @@ -19962,11 +4957,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, :metered_allowance] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance#cadence module Cadence extend Orb::Internal::Type::Enum @@ -19981,42 +4976,67 @@ module Cadence # @return [Array] end - # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation#cumulative_grouped_allocation_config - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute cumulative_allocation - # The overall allocation across all groups + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance#metered_allowance_config + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute allowance_grouping_value + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. # # @return [String] - required :cumulative_allocation, String + required :allowance_grouping_value, String - # @!attribute group_allocation - # The allocation per individual group + # @!attribute consumption_grouping_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. # # @return [String] - required :group_allocation, String + required :consumption_grouping_value, String # @!attribute grouping_key - # The event property used to group usage before applying allocations + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. # # @return [String] required :grouping_key, String # @!attribute unit_amount - # The amount to charge for each unit outside of the allocation + # Per-unit price applied to gross consumption and to the allowance credit. # # @return [String] required :unit_amount, String - # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:) - # Configuration for cumulative_grouped_allocation pricing + # @!attribute allowance_display_name + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). # - # @param cumulative_allocation [String] The overall allocation across all groups + # @return [String, nil] + optional :allowance_display_name, String + + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). # - # @param group_allocation [String] The allocation per individual group + # @return [String, nil] + optional :consumption_display_name, String + + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig} + # for more details. # - # @param grouping_key [String] The event property used to group usage before applying allocations + # Configuration for metered_allowance pricing # - # @param unit_amount [String] The amount to charge for each unit outside of the allocation + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p + # + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl + # + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant + # + # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit. + # + # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten'). end end @@ -20461,7 +5481,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput)] end end end diff --git a/lib/orb/models/changed_subscription_resources.rb b/lib/orb/models/changed_subscription_resources.rb index b6335a99..7b97ff2a 100644 --- a/lib/orb/models/changed_subscription_resources.rb +++ b/lib/orb/models/changed_subscription_resources.rb @@ -148,11 +148,13 @@ class CreatedInvoice < Orb::Internal::Type::BaseModel # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -164,6 +166,7 @@ class CreatedInvoice < Orb::Internal::Type::BaseModel # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -194,6 +197,7 @@ class CreatedInvoice < Orb::Internal::Type::BaseModel # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -215,6 +219,7 @@ class CreatedInvoice < Orb::Internal::Type::BaseModel # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -852,7 +857,7 @@ class LineItem < Orb::Internal::Type::BaseModel # For more on the types of prices, see # [the core concepts documentation](/core-concepts#plan-and-price) # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] required :price, union: -> { Orb::Price } # @!attribute quantity @@ -919,7 +924,7 @@ class LineItem < Orb::Internal::Type::BaseModel # # @param partially_invoiced_amount [String] Any amount applied from a partial invoice # - # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu + # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu # # @param quantity [Float] Either the fixed fee quantity or the usage during the service period. # diff --git a/lib/orb/models/customer.rb b/lib/orb/models/customer.rb index 923f9d90..ab54a502 100644 --- a/lib/orb/models/customer.rb +++ b/lib/orb/models/customer.rb @@ -178,11 +178,13 @@ class Customer < Orb::Internal::Type::BaseModel # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -194,6 +196,7 @@ class Customer < Orb::Internal::Type::BaseModel # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -224,6 +227,7 @@ class Customer < Orb::Internal::Type::BaseModel # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -245,6 +249,7 @@ class Customer < Orb::Internal::Type::BaseModel # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -452,7 +457,6 @@ 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 b865cd20..51007365 100644 --- a/lib/orb/models/customer_create_params.rb +++ b/lib/orb/models/customer_create_params.rb @@ -185,11 +185,13 @@ class CustomerCreateParams < Orb::Internal::Type::BaseModel # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -201,6 +203,7 @@ class CustomerCreateParams < Orb::Internal::Type::BaseModel # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -231,6 +234,7 @@ class CustomerCreateParams < Orb::Internal::Type::BaseModel # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -252,6 +256,7 @@ class CustomerCreateParams < Orb::Internal::Type::BaseModel # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/lib/orb/models/customer_tax_id.rb b/lib/orb/models/customer_tax_id.rb index 124b5325..cfa1e136 100644 --- a/lib/orb/models/customer_tax_id.rb +++ b/lib/orb/models/customer_tax_id.rb @@ -76,11 +76,13 @@ class CustomerTaxID < Orb::Internal::Type::BaseModel # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -92,6 +94,7 @@ class CustomerTaxID < Orb::Internal::Type::BaseModel # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -122,6 +125,7 @@ class CustomerTaxID < Orb::Internal::Type::BaseModel # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -143,6 +147,7 @@ class CustomerTaxID < Orb::Internal::Type::BaseModel # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -204,9 +209,9 @@ module Country CO = :CO CR = :CR CV = :CV - DE = :DE CY = :CY CZ = :CZ + DE = :DE DK = :DK DO = :DO EC = :EC @@ -216,9 +221,11 @@ module Country ET = :ET EU = :EU FI = :FI + FO = :FO FR = :FR GB = :GB GE = :GE + GI = :GI GN = :GN GR = :GR HK = :HK @@ -238,6 +245,7 @@ module Country KZ = :KZ LA = :LA LI = :LI + LK = :LK LT = :LT LU = :LU LV = :LV @@ -259,6 +267,7 @@ module Country PH = :PH PL = :PL PT = :PT + PY = :PY RO = :RO RS = :RS RU = :RU @@ -339,8 +348,10 @@ module Type ES_CIF = :es_cif ET_TIN = :et_tin EU_OSS_VAT = :eu_oss_vat + FO_VAT = :fo_vat GB_VAT = :gb_vat GE_VAT = :ge_vat + GI_TIN = :gi_tin GN_NIF = :gn_nif HK_BR = :hk_br HR_OIB = :hr_oib @@ -349,6 +360,7 @@ module Type IL_VAT = :il_vat IN_GST = :in_gst IS_VAT = :is_vat + IT_CF = :it_cf JP_CN = :jp_cn JP_RN = :jp_rn JP_TRN = :jp_trn @@ -360,6 +372,7 @@ module Type LA_TIN = :la_tin LI_UID = :li_uid LI_VAT = :li_vat + LK_VAT = :lk_vat MA_VAT = :ma_vat MD_VAT = :md_vat ME_PIB = :me_pib @@ -378,6 +391,7 @@ module Type PE_RUC = :pe_ruc PH_TIN = :ph_tin PL_NIP = :pl_nip + PY_RUC = :py_ruc RO_TIN = :ro_tin RS_PIB = :rs_pib RU_INN = :ru_inn diff --git a/lib/orb/models/customer_update_by_external_id_params.rb b/lib/orb/models/customer_update_by_external_id_params.rb index dc0aaf8d..f7a56f37 100644 --- a/lib/orb/models/customer_update_by_external_id_params.rb +++ b/lib/orb/models/customer_update_by_external_id_params.rb @@ -202,11 +202,13 @@ class CustomerUpdateByExternalIDParams < Orb::Internal::Type::BaseModel # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -218,6 +220,7 @@ class CustomerUpdateByExternalIDParams < Orb::Internal::Type::BaseModel # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -248,6 +251,7 @@ class CustomerUpdateByExternalIDParams < Orb::Internal::Type::BaseModel # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -269,6 +273,7 @@ class CustomerUpdateByExternalIDParams < Orb::Internal::Type::BaseModel # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/lib/orb/models/customer_update_params.rb b/lib/orb/models/customer_update_params.rb index 3fc1015f..ef4e7dd0 100644 --- a/lib/orb/models/customer_update_params.rb +++ b/lib/orb/models/customer_update_params.rb @@ -196,11 +196,13 @@ class CustomerUpdateParams < Orb::Internal::Type::BaseModel # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -212,6 +214,7 @@ class CustomerUpdateParams < Orb::Internal::Type::BaseModel # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -242,6 +245,7 @@ class CustomerUpdateParams < Orb::Internal::Type::BaseModel # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -263,6 +267,7 @@ class CustomerUpdateParams < Orb::Internal::Type::BaseModel # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/lib/orb/models/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 d5bde5a2..39330c7a 100644 --- a/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +++ b/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb @@ -388,9 +388,9 @@ class ExpirationChange < Orb::Internal::Type::BaseModel required :entry_type, const: :expiration_change # @!attribute target_expiry_date - # A future date (specified in YYYY-MM-DD format) used for expiration change, - # denoting when credits transferred (as part of a partial block expiration) should - # expire. + # A date (specified in YYYY-MM-DD format) used for expiration change, denoting + # when credits transferred (as part of a partial block expiration) should expire. + # This date must be on or after the effective date of the credit block. # # @return [Date] required :target_expiry_date, Date @@ -443,7 +443,7 @@ class ExpirationChange < Orb::Internal::Type::BaseModel # {Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::ExpirationChange} # for more details. # - # @param target_expiry_date [Date] A future date (specified in YYYY-MM-DD format) used for expiration change, denot + # @param target_expiry_date [Date] A date (specified in YYYY-MM-DD format) used for expiration change, denoting whe # # @param amount [Float, nil] The number of credits to effect. Note that this is required for increment, decre # diff --git a/lib/orb/models/customers/credits/ledger_create_entry_params.rb b/lib/orb/models/customers/credits/ledger_create_entry_params.rb index adc35aa7..46e2d4d6 100644 --- a/lib/orb/models/customers/credits/ledger_create_entry_params.rb +++ b/lib/orb/models/customers/credits/ledger_create_entry_params.rb @@ -388,9 +388,9 @@ class ExpirationChange < Orb::Internal::Type::BaseModel required :entry_type, const: :expiration_change # @!attribute target_expiry_date - # A future date (specified in YYYY-MM-DD format) used for expiration change, - # denoting when credits transferred (as part of a partial block expiration) should - # expire. + # A date (specified in YYYY-MM-DD format) used for expiration change, denoting + # when credits transferred (as part of a partial block expiration) should expire. + # This date must be on or after the effective date of the credit block. # # @return [Date] required :target_expiry_date, Date @@ -443,7 +443,7 @@ class ExpirationChange < Orb::Internal::Type::BaseModel # {Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::ExpirationChange} # for more details. # - # @param target_expiry_date [Date] A future date (specified in YYYY-MM-DD format) used for expiration change, denot + # @param target_expiry_date [Date] A date (specified in YYYY-MM-DD format) used for expiration change, denoting whe # # @param amount [Float, nil] The number of credits to effect. Note that this is required for increment, decre # diff --git a/lib/orb/models/dimensional_price_group.rb b/lib/orb/models/dimensional_price_group.rb index 9d3440cf..d5890cfe 100644 --- a/lib/orb/models/dimensional_price_group.rb +++ b/lib/orb/models/dimensional_price_group.rb @@ -49,7 +49,7 @@ class DimensionalPriceGroup < Orb::Internal::Type::BaseModel # {Orb::Models::DimensionalPriceGroup} for more details. # # A dimensional price group is used to partition the result of a billable metric - # by a set of dimensions. Prices in a price group must specify the parition used + # by a set of dimensions. Prices in a price group must specify the partition used # to derive their usage. # # @param id [String] diff --git a/lib/orb/models/invoice.rb b/lib/orb/models/invoice.rb index 5d8b4080..728b103f 100644 --- a/lib/orb/models/invoice.rb +++ b/lib/orb/models/invoice.rb @@ -112,11 +112,13 @@ class Invoice < Orb::Internal::Type::BaseModel # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -128,6 +130,7 @@ class Invoice < Orb::Internal::Type::BaseModel # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -158,6 +161,7 @@ class Invoice < Orb::Internal::Type::BaseModel # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -179,6 +183,7 @@ class Invoice < Orb::Internal::Type::BaseModel # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -806,7 +811,7 @@ class LineItem < Orb::Internal::Type::BaseModel # For more on the types of prices, see # [the core concepts documentation](/core-concepts#plan-and-price) # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] required :price, union: -> { Orb::Price } # @!attribute quantity @@ -871,7 +876,7 @@ class LineItem < Orb::Internal::Type::BaseModel # # @param partially_invoiced_amount [String] Any amount applied from a partial invoice # - # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu + # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu # # @param quantity [Float] Either the fixed fee quantity or the usage during the service period. # diff --git a/lib/orb/models/invoice_fetch_upcoming_response.rb b/lib/orb/models/invoice_fetch_upcoming_response.rb index 29e42ad3..db63b462 100644 --- a/lib/orb/models/invoice_fetch_upcoming_response.rb +++ b/lib/orb/models/invoice_fetch_upcoming_response.rb @@ -114,11 +114,13 @@ class InvoiceFetchUpcomingResponse < Orb::Internal::Type::BaseModel # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -130,6 +132,7 @@ class InvoiceFetchUpcomingResponse < Orb::Internal::Type::BaseModel # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -160,6 +163,7 @@ class InvoiceFetchUpcomingResponse < Orb::Internal::Type::BaseModel # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -181,6 +185,7 @@ class InvoiceFetchUpcomingResponse < Orb::Internal::Type::BaseModel # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -807,7 +812,7 @@ class LineItem < Orb::Internal::Type::BaseModel # For more on the types of prices, see # [the core concepts documentation](/core-concepts#plan-and-price) # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] required :price, union: -> { Orb::Price } # @!attribute quantity @@ -873,7 +878,7 @@ class LineItem < Orb::Internal::Type::BaseModel # # @param partially_invoiced_amount [String] Any amount applied from a partial invoice # - # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu + # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu # # @param quantity [Float] Either the fixed fee quantity or the usage during the service period. # diff --git a/lib/orb/models/invoice_issue_summary_response.rb b/lib/orb/models/invoice_issue_summary_response.rb index 9b275dff..6afa5b43 100644 --- a/lib/orb/models/invoice_issue_summary_response.rb +++ b/lib/orb/models/invoice_issue_summary_response.rb @@ -114,11 +114,13 @@ class InvoiceIssueSummaryResponse < Orb::Internal::Type::BaseModel # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -130,6 +132,7 @@ class InvoiceIssueSummaryResponse < Orb::Internal::Type::BaseModel # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -160,6 +163,7 @@ class InvoiceIssueSummaryResponse < Orb::Internal::Type::BaseModel # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -181,6 +185,7 @@ class InvoiceIssueSummaryResponse < Orb::Internal::Type::BaseModel # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/lib/orb/models/invoice_line_item_create_response.rb b/lib/orb/models/invoice_line_item_create_response.rb index 3b52bb57..bbce1342 100644 --- a/lib/orb/models/invoice_line_item_create_response.rb +++ b/lib/orb/models/invoice_line_item_create_response.rb @@ -83,7 +83,7 @@ class InvoiceLineItemCreateResponse < Orb::Internal::Type::BaseModel # For more on the types of prices, see # [the core concepts documentation](/core-concepts#plan-and-price) # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] required :price, union: -> { Orb::Price } # @!attribute quantity @@ -149,7 +149,7 @@ class InvoiceLineItemCreateResponse < Orb::Internal::Type::BaseModel # # @param partially_invoiced_amount [String] Any amount applied from a partial invoice # - # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu + # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu # # @param quantity [Float] Either the fixed fee quantity or the usage during the service period. # diff --git a/lib/orb/models/invoice_list_summary_response.rb b/lib/orb/models/invoice_list_summary_response.rb index 675a5b2f..64df4647 100644 --- a/lib/orb/models/invoice_list_summary_response.rb +++ b/lib/orb/models/invoice_list_summary_response.rb @@ -114,11 +114,13 @@ class InvoiceListSummaryResponse < Orb::Internal::Type::BaseModel # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -130,6 +132,7 @@ class InvoiceListSummaryResponse < Orb::Internal::Type::BaseModel # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -160,6 +163,7 @@ class InvoiceListSummaryResponse < Orb::Internal::Type::BaseModel # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -181,6 +185,7 @@ class InvoiceListSummaryResponse < Orb::Internal::Type::BaseModel # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/lib/orb/models/new_allocation_price.rb b/lib/orb/models/new_allocation_price.rb index e881028f..c3ec2dc4 100644 --- a/lib/orb/models/new_allocation_price.rb +++ b/lib/orb/models/new_allocation_price.rb @@ -55,6 +55,14 @@ class NewAllocationPrice < Orb::Internal::Type::BaseModel # @return [String, nil] optional :license_type_id, String, nil?: true + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + # @!attribute per_unit_cost_basis # The (per-unit) cost basis of each created block. If non-zero, a customer will be # invoiced according to the quantity and per unit cost basis specified for the @@ -63,7 +71,7 @@ class NewAllocationPrice < Orb::Internal::Type::BaseModel # @return [String, nil] optional :per_unit_cost_basis, String - # @!method initialize(amount:, cadence:, currency:, custom_expiration: nil, expires_at_end_of_cadence: nil, filters: nil, item_id: nil, license_type_id: nil, per_unit_cost_basis: nil) + # @!method initialize(amount:, cadence:, currency:, custom_expiration: nil, expires_at_end_of_cadence: nil, filters: nil, item_id: nil, license_type_id: nil, metadata: nil, per_unit_cost_basis: nil) # Some parameter documentations has been truncated, see # {Orb::Models::NewAllocationPrice} for more details. # @@ -83,6 +91,8 @@ class NewAllocationPrice < Orb::Internal::Type::BaseModel # # @param license_type_id [String, nil] The license type ID to associate the price with license allocation. # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # # @param per_unit_cost_basis [String] The (per-unit) cost basis of each created block. If non-zero, a customer will be # The cadence at which to allocate the amount to the customer. diff --git a/lib/orb/models/per_price_cost.rb b/lib/orb/models/per_price_cost.rb index 4b717145..49b2bf7b 100644 --- a/lib/orb/models/per_price_cost.rb +++ b/lib/orb/models/per_price_cost.rb @@ -6,7 +6,7 @@ class PerPriceCost < Orb::Internal::Type::BaseModel # @!attribute price # The price object # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] required :price, union: -> { Orb::Price } # @!attribute price_id @@ -34,7 +34,7 @@ class PerPriceCost < Orb::Internal::Type::BaseModel optional :quantity, Float, nil?: true # @!method initialize(price:, price_id:, subtotal:, total:, quantity: nil) - # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The price object + # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The price object # # @param price_id [String] The price the cost is associated with # diff --git a/lib/orb/models/plan.rb b/lib/orb/models/plan.rb index 404c2f12..10ef6a47 100644 --- a/lib/orb/models/plan.rb +++ b/lib/orb/models/plan.rb @@ -138,7 +138,7 @@ class Plan < Orb::Internal::Type::BaseModel # Prices for this plan. If the plan has phases, this includes prices across all # phases of the plan. # - # @return [Array] + # @return [Array] required :prices, -> { Orb::Internal::Type::ArrayOf[union: Orb::Price] } # @!attribute product @@ -208,7 +208,7 @@ class Plan < Orb::Internal::Type::BaseModel # # @param plan_phases [Array, nil] # - # @param prices [Array] Prices for this plan. If the plan has phases, this includes prices across all ph + # @param prices [Array] Prices for this plan. If the plan has phases, this includes prices across all ph # # @param product [Orb::Models::Plan::Product] # diff --git a/lib/orb/models/plan_create_params.rb b/lib/orb/models/plan_create_params.rb index a08ff78a..12904754 100644 --- a/lib/orb/models/plan_create_params.rb +++ b/lib/orb/models/plan_create_params.rb @@ -43,6 +43,12 @@ class PlanCreateParams < Orb::Internal::Type::BaseModel # @return [String, nil] optional :default_invoice_memo, String, nil?: true + # @!attribute description + # An optional user-defined description of the plan. + # + # @return [String, nil] + optional :description, String, nil?: true + # @!attribute external_plan_id # # @return [String, nil] @@ -78,7 +84,7 @@ class PlanCreateParams < Orb::Internal::Type::BaseModel # @return [Symbol, Orb::Models::PlanCreateParams::Status, nil] optional :status, enum: -> { Orb::PlanCreateParams::Status } - # @!method initialize(currency:, name:, prices:, adjustments: nil, default_invoice_memo: nil, external_plan_id: nil, metadata: nil, net_terms: nil, plan_phases: nil, status: nil, request_options: {}) + # @!method initialize(currency:, name:, prices:, adjustments: nil, default_invoice_memo: nil, description: nil, external_plan_id: nil, metadata: nil, net_terms: nil, plan_phases: nil, status: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::PlanCreateParams} for more details. # @@ -92,6 +98,8 @@ class PlanCreateParams < Orb::Internal::Type::BaseModel # # @param default_invoice_memo [String, nil] Free-form text which is available on the invoice PDF and the Orb invoice portal. # + # @param description [String, nil] An optional user-defined description of the plan. + # # @param external_plan_id [String, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed @@ -114,9 +122,9 @@ class Price < Orb::Internal::Type::BaseModel # @!attribute license_allocation_price # The license allocation price to add to the plan. # - # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Unit, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput, nil] + # @return [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice, nil] optional :license_allocation_price, - union: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice }, + -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice }, nil?: true # @!attribute plan_phase_order @@ -128,113 +136,349 @@ class Price < Orb::Internal::Type::BaseModel # @!attribute price # New plan price request body params. # - # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput, nil] + # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance, Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput, nil] optional :price, union: -> { Orb::PlanCreateParams::Price::Price }, nil?: true # @!method initialize(allocation_price: nil, license_allocation_price: nil, plan_phase_order: nil, price: nil) # @param allocation_price [Orb::Models::NewAllocationPrice, nil] The allocation price to add to the plan. # - # @param license_allocation_price [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Unit, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Percent, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput, nil] The license allocation price to add to the plan. + # @param license_allocation_price [Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice, nil] The license allocation price to add to the plan. # # @param plan_phase_order [Integer, nil] The phase to add this price to. # - # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput, nil] New plan price request body params. + # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance, Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput, nil] New plan price request body params. - # The license allocation price to add to the plan. - # # @see Orb::Models::PlanCreateParams::Price#license_allocation_price - module LicenseAllocationPrice + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Cadence] + required :cadence, enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute license_allocations + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + # + # @return [Array] + required :license_allocations, + -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::LicenseAllocation] } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ModelType] + required :model_type, enum: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::ModelType } + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute unit_config + # Configuration for unit pricing + # + # @return [Orb::Models::UnitConfig] + required :unit_config, -> { Orb::UnitConfig } + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::ConversionRateConfig }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, license_allocations:, model_type:, name:, unit_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice} for more details. + # + # The license allocation price to add to the plan. + # + # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # + # @param model_type [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ModelType] The pricing model type + # + # @param name [String] The name of the price. + # + # @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + + # The cadence to bill for this price on. + # + # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + class LicenseAllocation < Orb::Internal::Type::BaseModel + # @!attribute amount + # The amount of credits granted per active license per cadence. + # + # @return [String] + required :amount, String + + # @!attribute currency + # The currency of the license allocation. + # + # @return [String] + required :currency, String + + # @!attribute write_off_overage + # When True, overage beyond the allocation is written off. + # + # @return [Boolean, nil] + optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + + # @!method initialize(amount:, currency:, write_off_overage: nil) + # @param amount [String] The amount of credits granted per active license per cadence. + # + # @param currency [String] The currency of the license allocation. + # + # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + end + + # The pricing model type + # + # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice#model_type + module ModelType + extend Orb::Internal::Type::Enum + + UNIT = :unit + + # @!method self.values + # @return [Array] + end + end + + # New plan price request body params. + # + # @see Orb::Models::PlanCreateParams::Price#price + module Price extend Orb::Internal::Type::Union discriminator :model_type - variant :unit, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit } + variant :unit, -> { Orb::NewPlanUnitPrice } + + variant :tiered, -> { Orb::NewPlanTieredPrice } - variant :tiered, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered } + variant :bulk, -> { Orb::NewPlanBulkPrice } - variant :bulk, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk } + variant :bulk_with_filters, -> { Orb::PlanCreateParams::Price::Price::BulkWithFilters } - variant :bulk_with_filters, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters } + variant :package, -> { Orb::NewPlanPackagePrice } - variant :package, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package } + variant :matrix, -> { Orb::NewPlanMatrixPrice } - variant :matrix, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix } + variant :threshold_total_amount, -> { Orb::NewPlanThresholdTotalAmountPrice } - variant :threshold_total_amount, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount } + variant :tiered_package, -> { Orb::NewPlanTieredPackagePrice } - variant :tiered_package, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage } + variant :tiered_with_minimum, -> { Orb::NewPlanTieredWithMinimumPrice } - variant :tiered_with_minimum, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum } + variant :grouped_tiered, -> { Orb::NewPlanGroupedTieredPrice } - variant :grouped_tiered, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered } + variant :tiered_package_with_minimum, -> { Orb::NewPlanTieredPackageWithMinimumPrice } - variant :tiered_package_with_minimum, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum } + variant :package_with_allocation, -> { Orb::NewPlanPackageWithAllocationPrice } - variant :package_with_allocation, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation } + variant :unit_with_percent, -> { Orb::NewPlanUnitWithPercentPrice } - variant :unit_with_percent, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent } + variant :matrix_with_allocation, -> { Orb::NewPlanMatrixWithAllocationPrice } - variant :matrix_with_allocation, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation } + variant :matrix_with_threshold_discounts, + -> { Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts } - variant :tiered_with_proration, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration } + variant :tiered_with_proration, -> { Orb::PlanCreateParams::Price::Price::TieredWithProration } - variant :unit_with_proration, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration } + variant :unit_with_proration, -> { Orb::NewPlanUnitWithProrationPrice } - variant :grouped_allocation, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation } + variant :grouped_allocation, -> { Orb::NewPlanGroupedAllocationPrice } - variant :bulk_with_proration, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration } + variant :bulk_with_proration, -> { Orb::NewPlanBulkWithProrationPrice } - variant :grouped_with_prorated_minimum, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum } + variant :grouped_with_prorated_minimum, -> { Orb::NewPlanGroupedWithProratedMinimumPrice } - variant :grouped_with_metered_minimum, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum } + variant :grouped_with_metered_minimum, -> { Orb::NewPlanGroupedWithMeteredMinimumPrice } variant :grouped_with_min_max_thresholds, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds } + -> { Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds } - variant :matrix_with_display_name, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName } + variant :matrix_with_display_name, -> { Orb::NewPlanMatrixWithDisplayNamePrice } - variant :grouped_tiered_package, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage } + variant :grouped_tiered_package, -> { Orb::NewPlanGroupedTieredPackagePrice } - variant :max_group_tiered_package, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage } + variant :max_group_tiered_package, -> { Orb::NewPlanMaxGroupTieredPackagePrice } - variant :scalable_matrix_with_unit_pricing, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing } + variant :scalable_matrix_with_unit_pricing, -> { Orb::NewPlanScalableMatrixWithUnitPricingPrice } - variant :scalable_matrix_with_tiered_pricing, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing } + variant :scalable_matrix_with_tiered_pricing, -> { Orb::NewPlanScalableMatrixWithTieredPricingPrice } - variant :cumulative_grouped_bulk, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk } + variant :cumulative_grouped_bulk, -> { Orb::NewPlanCumulativeGroupedBulkPrice } variant :cumulative_grouped_allocation, - -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation } + -> { Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation } + + variant :daily_credit_allowance, -> { Orb::PlanCreateParams::Price::Price::DailyCreditAllowance } - variant :minimum_composite, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite } + variant :metered_allowance, -> { Orb::PlanCreateParams::Price::Price::MeteredAllowance } + + variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice } + + variant :percent, -> { Orb::PlanCreateParams::Price::Price::Percent } - variant :percent, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent } + variant :event_output, -> { Orb::PlanCreateParams::Price::Price::EventOutput } - variant :event_output, -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput } + class BulkWithFilters < Orb::Internal::Type::BaseModel + # @!attribute bulk_with_filters_config + # Configuration for bulk_with_filters pricing + # + # @return [Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig] + required :bulk_with_filters_config, + -> { Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig } - 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 } + # @return [Symbol, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters::Cadence] + required :cadence, enum: -> { Orb::PlanCreateParams::Price::Price::BulkWithFilters::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -242,20 +486,11 @@ class Unit < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::LicenseAllocation] } - # @!attribute model_type # The pricing model type # - # @return [Symbol, :unit] - required :model_type, const: :unit + # @return [Symbol, :bulk_with_filters] + required :model_type, const: :bulk_with_filters # @!attribute name # The name of the price. @@ -263,12 +498,6 @@ class Unit < Orb::Internal::Type::BaseModel # @return [String] required :name, String - # @!attribute unit_config - # Configuration for unit pricing - # - # @return [Orb::Models::UnitConfig] - required :unit_config, -> { Orb::UnitConfig } - # @!attribute billable_metric_id # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -301,9 +530,7 @@ class Unit < Orb::Internal::Type::BaseModel # # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, - union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::ConversionRateConfig - }, + union: -> { Orb::PlanCreateParams::Price::Price::BulkWithFilters::ConversionRateConfig }, nil?: true # @!attribute currency @@ -370,21 +597,18 @@ class Unit < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(cadence:, item_id:, license_allocations:, name:, unit_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :unit) + # @!method initialize(bulk_with_filters_config:, cadence:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_filters) # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Unit} for more - # details. + # {Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters} for more details. # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Unit::Cadence] The cadence to bill for this price on. + # @param bulk_with_filters_config [Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing # - # @param item_id [String] The id of the item the price will be associated with. + # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters::Cadence] The cadence to bill for this price on. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # @param item_id [String] The id of the item the price will be associated with. # # @param name [String] The name of the price. # - # @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing - # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b # # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi @@ -413,11 +637,77 @@ class Unit < Orb::Internal::Type::BaseModel # # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments # - # @param model_type [Symbol, :unit] The pricing model type + # @param model_type [Symbol, :bulk_with_filters] The pricing model type + + # @see Orb::Models::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::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::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::PlanCreateParams::Price::LicenseAllocationPrice::Unit#cadence + # @see Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters#cadence module Cadence extend Orb::Internal::Type::Enum @@ -431,41 +721,14 @@ module Cadence # @!method self.values # @return [Array] end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. - # - # @return [String] - required :amount, String - - # @!attribute currency - # The currency of the license allocation. - # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. - end end - class Tiered < Orb::Internal::Type::BaseModel + class MatrixWithThresholdDiscounts < 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 } + # @return [Symbol, Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence] + required :cadence, enum: -> { Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -473,20 +736,18 @@ class Tiered < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. + # @!attribute matrix_with_threshold_discounts_config + # Configuration for matrix_with_threshold_discounts pricing # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::LicenseAllocation] } + # @return [Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] + required :matrix_with_threshold_discounts_config, + -> { Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig } # @!attribute model_type # The pricing model type # - # @return [Symbol, :tiered] - required :model_type, const: :tiered + # @return [Symbol, :matrix_with_threshold_discounts] + required :model_type, const: :matrix_with_threshold_discounts # @!attribute name # The name of the price. @@ -494,12 +755,6 @@ class Tiered < Orb::Internal::Type::BaseModel # @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. @@ -533,7 +788,7 @@ class Tiered < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::ConversionRateConfig + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::ConversionRateConfig }, nil?: true @@ -601,21 +856,19 @@ class Tiered < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(cadence:, item_id:, license_allocations:, name:, tiered_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered) + # @!method initialize(cadence:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_threshold_discounts) # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered} for more - # details. + # {Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts} for + # more details. # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # @param matrix_with_threshold_discounts_config [Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing # # @param name [String] The name of the price. # - # @param 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 @@ -644,11 +897,11 @@ class Tiered < Orb::Internal::Type::BaseModel # # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments # - # @param model_type [Symbol, :tiered] The pricing model type + # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered#cadence + # @see Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts#cadence module Cadence extend Orb::Internal::Type::Enum @@ -663,46 +916,138 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. + # @see Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + # @!attribute default_unit_amount + # Unit price used for usage that does not match any defined matrix cell. # # @return [String] - required :amount, String + required :default_unit_amount, String - # @!attribute currency - # The currency of the license allocation. + # @!attribute first_dimension + # First matrix dimension key. # # @return [String] - required :currency, String + required :first_dimension, String + + # @!attribute matrix_values + # Per-cell unit prices. + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + end - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. + # @!attribute second_dimension + # Optional second matrix dimension key. + # + # @return [String, nil] + optional :second_dimension, String, nil?: true + + # @!attribute threshold_discount_groups # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @return [Array, nil] + optional :threshold_discount_groups, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + end - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. + # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil) + # Configuration for matrix_with_threshold_discounts pricing + # + # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell. + # + # @param first_dimension [String] First matrix dimension key. + # + # @param matrix_values [Array] Per-cell unit prices. # - # @param currency [String] The currency of the license allocation. + # @param second_dimension [String, nil] Optional second matrix dimension key. # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + # @param threshold_discount_groups [Array] + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute first_dimension_value + # + # @return [String] + required :first_dimension_value, String + + # @!attribute unit_amount + # + # @return [String] + required :unit_amount, String + + # @!attribute second_dimension_value + # + # @return [String, nil] + optional :second_dimension_value, String, nil?: true + + # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil) + # @param first_dimension_value [String] + # @param unit_amount [String] + # @param second_dimension_value [String, nil] + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + # @!attribute above_threshold_discount_percentage + # Discount rate applied to spend above the threshold. + # + # @return [String] + required :above_threshold_discount_percentage, String + + # @!attribute below_threshold_discount_percentage + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + # + # @return [String] + required :below_threshold_discount_percentage, String + + # @!attribute cell_coordinates + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + # + # @return [String] + required :cell_coordinates, String + + # @!attribute threshold_amount + # + # @return [String] + required :threshold_amount, String + + # @!attribute description + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup} + # for more details. + # + # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold. + # + # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli + # + # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # + # @param threshold_amount [String] + # + # @param description [String, nil] + end end end - class Bulk < Orb::Internal::Type::BaseModel - # @!attribute bulk_config - # Configuration for bulk pricing - # - # @return [Orb::Models::BulkConfig] - required :bulk_config, -> { Orb::BulkConfig } - + class TieredWithProration < Orb::Internal::Type::BaseModel # @!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 } + # @return [Symbol, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration::Cadence] + required :cadence, enum: -> { Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -710,20 +1055,11 @@ class Bulk < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String - # @!attribute license_allocations - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::LicenseAllocation] } - # @!attribute model_type # The pricing model type # - # @return [Symbol, :bulk] - required :model_type, const: :bulk + # @return [Symbol, :tiered_with_proration] + required :model_type, const: :tiered_with_proration # @!attribute name # The name of the price. @@ -731,6 +1067,13 @@ class Bulk < Orb::Internal::Type::BaseModel # @return [String] required :name, String + # @!attribute tiered_with_proration_config + # Configuration for tiered_with_proration pricing + # + # @return [Orb::Models::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig] + required :tiered_with_proration_config, + -> { Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig } + # @!attribute billable_metric_id # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -764,7 +1107,7 @@ class Bulk < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::ConversionRateConfig + Orb::PlanCreateParams::Price::Price::TieredWithProration::ConversionRateConfig }, nil?: true @@ -832,21 +1175,19 @@ class Bulk < Orb::Internal::Type::BaseModel # @return [String, nil] optional :reference_id, String, nil?: true - # @!method initialize(bulk_config:, cadence:, item_id:, license_allocations:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk) + # @!method initialize(cadence:, 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::PlanCreateParams::Price::LicenseAllocationPrice::Bulk} for more + # {Orb::Models::PlanCreateParams::Price::Price::TieredWithProration} 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 cadence [Symbol, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # # @param name [String] The name of the price. # + # @param tiered_with_proration_config [Orb::Models::PlanCreateParams::Price::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 @@ -875,11 +1216,11 @@ class Bulk < Orb::Internal::Type::BaseModel # # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments # - # @param model_type [Symbol, :bulk] The pricing model type + # @param model_type [Symbol, :tiered_with_proration] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk#cadence + # @see Orb::Models::PlanCreateParams::Price::Price::TieredWithProration#cadence module Cadence extend Orb::Internal::Type::Enum @@ -894,48 +1235,61 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. + # @see Orb::Models::PlanCreateParams::Price::Price::TieredWithProration#tiered_with_proration_config + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + # @!attribute tiers + # Tiers for rating based on total usage quantities into the specified tier with + # proration # - # @return [String] - required :amount, String + # @return [Array] + required :tiers, + -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier] } - # @!attribute currency - # The currency of the license allocation. + # @!method initialize(tiers:) + # Some parameter documentations has been truncated, see + # {Orb::Models::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig} + # for more details. # - # @return [String] - required :currency, String - - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. + # Configuration for tiered_with_proration pricing # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @param tiers [Array] Tiers for rating based on total usage quantities into the specified tier with pr - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param currency [String] The currency of the license allocation. - # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + class Tier < Orb::Internal::Type::BaseModel + # @!attribute tier_lower_bound + # Inclusive tier starting value + # + # @return [String] + required :tier_lower_bound, String + + # @!attribute unit_amount + # Amount per unit + # + # @return [String] + required :unit_amount, String + + # @!method initialize(tier_lower_bound:, unit_amount:) + # Configuration for a single tiered with proration tier + # + # @param tier_lower_bound [String] Inclusive tier starting value + # + # @param unit_amount [String] Amount per unit + end end end - class 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 } - + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @!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 } + # @return [Symbol, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence] + required :cadence, enum: -> { Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence } + + # @!attribute grouped_with_min_max_thresholds_config + # Configuration for grouped_with_min_max_thresholds pricing + # + # @return [Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] + required :grouped_with_min_max_thresholds_config, + -> { Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } # @!attribute item_id # The id of the item the price will be associated with. @@ -943,20 +1297,11 @@ 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::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation] } - # @!attribute model_type # The pricing model type # - # @return [Symbol, :bulk_with_filters] - required :model_type, const: :bulk_with_filters + # @return [Symbol, :grouped_with_min_max_thresholds] + required :model_type, const: :grouped_with_min_max_thresholds # @!attribute name # The name of the price. @@ -997,7 +1342,7 @@ class BulkWithFilters < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::ConversionRateConfig + Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::ConversionRateConfig }, nil?: true @@ -1065,19 +1410,17 @@ class BulkWithFilters < Orb::Internal::Type::BaseModel # @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) + # @!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::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters} - # for more details. + # {Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds} 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::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence] The cadence to bill for this price on. + # @param grouped_with_min_max_thresholds_config [Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen - # # @param name [String] The name of the price. # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b @@ -1108,77 +1451,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::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 + # @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::BulkWithFilters#cadence + # @see Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1193,40 +1470,58 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. + # @see Orb::Models::PlanCreateParams::Price::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 :amount, String + required :maximum_charge, String - # @!attribute currency - # The currency of the license allocation. + # @!attribute minimum_charge + # The minimum amount to charge each group, regardless of usage # # @return [String] - required :currency, String + required :minimum_charge, String - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. + # @!attribute per_unit_rate + # The base price charged per group # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @return [String] + required :per_unit_rate, String - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. + # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:) + # Configuration for grouped_with_min_max_thresholds pricing + # + # @param grouping_key [String] The event property used to group before applying thresholds # - # @param currency [String] The currency of the license allocation. + # @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 write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + # @param per_unit_rate [String] The base price charged per group end end - class Package < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < 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 } + # @return [Symbol, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence] + required :cadence, enum: -> { Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence } + + # @!attribute cumulative_grouped_allocation_config + # Configuration for cumulative_grouped_allocation pricing + # + # @return [Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] + required :cumulative_grouped_allocation_config, + -> { Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig } # @!attribute item_id # The id of the item the price will be associated with. @@ -1234,20 +1529,11 @@ class Package < 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::PlanCreateParams::Price::LicenseAllocationPrice::Package::LicenseAllocation] } - # @!attribute model_type # The pricing model type # - # @return [Symbol, :package] - required :model_type, const: :package + # @return [Symbol, :cumulative_grouped_allocation] + required :model_type, const: :cumulative_grouped_allocation # @!attribute name # The name of the price. @@ -1255,12 +1541,6 @@ class Package < Orb::Internal::Type::BaseModel # @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. @@ -1294,7 +1574,7 @@ class Package < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::ConversionRateConfig + Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::ConversionRateConfig }, nil?: true @@ -1362,21 +1642,19 @@ class Package < Orb::Internal::Type::BaseModel # @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) + # @!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::PlanCreateParams::Price::LicenseAllocationPrice::Package} for more - # details. + # {Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation} for + # more details. # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::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 cumulative_grouped_allocation_config [Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # @param item_id [String] The id of the item the price will be associated with. # # @param name [String] The name of the price. # - # @param 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 @@ -1405,11 +1683,11 @@ class Package < 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, :package] The pricing model type + # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package#cadence + # @see Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1424,40 +1702,58 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. + # @see Orb::Models::PlanCreateParams::Price::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 :amount, String + required :group_allocation, String - # @!attribute currency - # The currency of the license allocation. + # @!attribute grouping_key + # The event property used to group usage before applying allocations # # @return [String] - required :currency, String + required :grouping_key, String - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. + # @!attribute unit_amount + # The amount to charge for each unit outside of the allocation # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @return [String] + required :unit_amount, String - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. + # @!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 currency [String] The currency of the license allocation. + # @param grouping_key [String] The event property used to group usage before applying allocations # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + # @param unit_amount [String] The amount to charge for each unit outside of the allocation end end - class Matrix < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < 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 } + # @return [Symbol, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence] + required :cadence, enum: -> { Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence } + + # @!attribute daily_credit_allowance_config + # Configuration for daily_credit_allowance pricing + # + # @return [Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] + required :daily_credit_allowance_config, + -> { Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig } # @!attribute item_id # The id of the item the price will be associated with. @@ -1465,26 +1761,11 @@ class Matrix < 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::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 + # @return [Symbol, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance # @!attribute name # The name of the price. @@ -1525,7 +1806,7 @@ class Matrix < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::ConversionRateConfig + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::ConversionRateConfig }, nil?: true @@ -1593,18 +1874,16 @@ class Matrix < Orb::Internal::Type::BaseModel # @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) + # @!method initialize(cadence:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :daily_credit_allowance) # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix} for more + # {Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance} for more # details. # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::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 daily_credit_allowance_config [Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing # - # @param matrix_config [Orb::Models::MatrixConfig] Configuration for matrix pricing + # @param item_id [String] The id of the item the price will be associated with. # # @param name [String] The name of the price. # @@ -1636,11 +1915,11 @@ class Matrix < 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, :matrix] The pricing model type + # @param model_type [Symbol, :daily_credit_allowance] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix#cadence + # @see Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1655,41 +1934,94 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. + # @see Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance#daily_credit_allowance_config + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute daily_allowance + # Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @return [String] + required :daily_allowance, String + + # @!attribute default_unit_amount + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value # # @return [String] - required :amount, String + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true] - # @!attribute currency - # The currency of the license allocation. + # @!attribute event_day_property + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. # # @return [String] - required :currency, String + required :event_day_property, String - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. + # @!attribute matrix_values + # Per-dimension credit rates # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true + # @return [Array] + required :matrix_values, + -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] } - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig} + # for more details. + # + # Configuration for daily_credit_allowance pricing + # + # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over. # - # @param currency [String] The currency of the license allocation. + # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified + # matrix\_ # - # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. + # @param dimensions [Array] One or two event property values to evaluate matrix groups by + # + # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g. + # + # @param matrix_values [Array] Per-dimension credit rates + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + # + # @return [Array] + required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Credits charged per unit of usage matching the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!method initialize(dimension_values:, unit_amount:) + # Some parameter documentations has been truncated, see + # {Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue} + # for more details. + # + # Per-dimension credit price for the daily credit allowance model. + # + # @param dimension_values [Array] One or two matrix keys to filter usage to this value by. For example, ["model"] + # + # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values + end end end - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel + class MeteredAllowance < 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 } + # @return [Symbol, Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::Cadence] + required :cadence, enum: -> { Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -1697,20 +2029,18 @@ class ThresholdTotalAmount < 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. + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing # - # @return [Array] - required :license_allocations, - -> { Orb::Internal::Type::ArrayOf[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation] } + # @return [Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, + -> { Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig } # @!attribute model_type # The pricing model type # - # @return [Symbol, :threshold_total_amount] - required :model_type, const: :threshold_total_amount + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance # @!attribute name # The name of the price. @@ -1718,13 +2048,6 @@ class ThresholdTotalAmount < Orb::Internal::Type::BaseModel # @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. @@ -1758,7 +2081,7 @@ class ThresholdTotalAmount < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ConversionRateConfig + Orb::PlanCreateParams::Price::Price::MeteredAllowance::ConversionRateConfig }, nil?: true @@ -1826,21 +2149,19 @@ class ThresholdTotalAmount < Orb::Internal::Type::BaseModel # @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) + # @!method initialize(cadence:, item_id:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :metered_allowance) # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount} - # for more details. + # {Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance} for more + # details. # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # - # @param license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # @param metered_allowance_config [Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing # # @param name [String] The name of the price. # - # @param 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 @@ -1869,11 +2190,11 @@ class ThresholdTotalAmount < 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, :threshold_total_amount] The pricing model type + # @param model_type [Symbol, :metered_allowance] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount#cadence + # @see Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1888,7774 +2209,67 @@ module Cadence # @return [Array] end - class LicenseAllocation < Orb::Internal::Type::BaseModel - # @!attribute amount - # The amount of credits granted per active license per cadence. + # @see Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance#metered_allowance_config + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute allowance_grouping_value + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. # # @return [String] - required :amount, String + required :allowance_grouping_value, String - # @!attribute currency - # The currency of the license allocation. + # @!attribute consumption_grouping_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. # # @return [String] - required :currency, String + required :consumption_grouping_value, String - # @!attribute write_off_overage - # When True, overage beyond the allocation is written off. - # - # @return [Boolean, nil] - optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - - # @!method initialize(amount:, currency:, write_off_overage: nil) - # @param amount [String] The amount of credits granted per active license per cadence. - # - # @param 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 - 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::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::CumulativeGroupedAllocation } - - variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice } - - variant :percent, -> { Orb::PlanCreateParams::Price::Price::Percent } - - variant :event_output, -> { Orb::PlanCreateParams::Price::Price::EventOutput } - - class BulkWithFilters < Orb::Internal::Type::BaseModel - # @!attribute bulk_with_filters_config - # Configuration for bulk_with_filters pricing - # - # @return [Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig] - required :bulk_with_filters_config, - -> { Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig } - - # @!attribute cadence - # The cadence to bill for this price on. - # - # @return [Symbol, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters::Cadence] - required :cadence, enum: -> { Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::BulkWithFilters} for more details. - # - # @param bulk_with_filters_config [Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::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::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::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::TieredWithProration::Cadence] - required :cadence, enum: -> { Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig] - required :tiered_with_proration_config, - -> { Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::TieredWithProration} for more - # details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier] } - - # @!method initialize(tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence] - required :cadence, enum: -> { Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence } - - # @!attribute grouped_with_min_max_thresholds_config - # Configuration for grouped_with_min_max_thresholds pricing - # - # @return [Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] - required :grouped_with_min_max_thresholds_config, - -> { Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds} for - # more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. - # - # @param grouped_with_min_max_thresholds_config [Orb::Models::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::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 + # @!attribute grouping_key + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. # # @return [String] required :grouping_key, String - # @!attribute 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 + # @!attribute unit_amount + # Per-unit price applied to gross consumption and to the allowance credit. # # @return [String] - required :per_unit_rate, String + required :unit_amount, 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 + # @!attribute allowance_display_name + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). # - # @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::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence] - required :cadence, enum: -> { Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence } - - # @!attribute cumulative_grouped_allocation_config - # Configuration for cumulative_grouped_allocation pricing - # - # @return [Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] - required :cumulative_grouped_allocation_config, - -> { Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::CumulativeGroupedAllocation} for - # more details. - # - # @param cadence [Symbol, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on. - # - # @param cumulative_grouped_allocation_config [Orb::Models::PlanCreateParams::Price::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::PlanCreateParams::Price::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 + # @return [String, nil] + optional :allowance_display_name, String - # @see Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation#cumulative_grouped_allocation_config - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute cumulative_allocation - # The overall allocation across all groups + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). # - # @return [String] - required :cumulative_allocation, String + # @return [String, nil] + optional :consumption_display_name, String - # @!attribute group_allocation - # The allocation per individual group + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig} + # for more details. # - # @return [String] - required :group_allocation, String - - # @!attribute grouping_key - # The event property used to group usage before applying allocations + # Configuration for metered_allowance pricing # - # @return [String] - required :grouping_key, String - - # @!attribute unit_amount - # The amount to charge for each unit outside of the allocation + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p # - # @return [String] - required :unit_amount, String - - # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:) - # Configuration for cumulative_grouped_allocation pricing + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl # - # @param cumulative_allocation [String] The overall allocation across all groups + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant # - # @param group_allocation [String] The allocation per individual group + # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit. # - # @param grouping_key [String] The event property used to group usage before applying allocations + # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress'). # - # @param unit_amount [String] The amount to charge for each unit outside of the allocation + # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten'). end end @@ -10091,7 +2705,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput)] + # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts, Orb::Models::PlanCreateParams::Price::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance, Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::PlanCreateParams::Price::Price::Percent, Orb::Models::PlanCreateParams::Price::Price::EventOutput)] end end diff --git a/lib/orb/models/plan_update_params.rb b/lib/orb/models/plan_update_params.rb index 7a60ace7..99ce08e7 100644 --- a/lib/orb/models/plan_update_params.rb +++ b/lib/orb/models/plan_update_params.rb @@ -12,6 +12,12 @@ class PlanUpdateParams < Orb::Internal::Type::BaseModel # @return [String] required :plan_id, String + # @!attribute description + # An optional user-defined description of the plan. + # + # @return [String, nil] + optional :description, String, nil?: true + # @!attribute external_plan_id # An optional user-defined ID for this plan resource, used throughout the system # as an alias for this Plan. Use this field to identify a plan by an existing @@ -28,12 +34,14 @@ class PlanUpdateParams < Orb::Internal::Type::BaseModel # @return [Hash{Symbol=>String, nil}, nil] optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - # @!method initialize(plan_id:, external_plan_id: nil, metadata: nil, request_options: {}) + # @!method initialize(plan_id:, description: nil, external_plan_id: nil, metadata: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::PlanUpdateParams} for more details. # # @param plan_id [String] # + # @param description [String, nil] An optional user-defined description of the plan. + # # @param external_plan_id [String, nil] An optional user-defined ID for this plan resource, used throughout the system a # # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed diff --git a/lib/orb/models/plan_version.rb b/lib/orb/models/plan_version.rb index 8a3247a2..3fd3632f 100644 --- a/lib/orb/models/plan_version.rb +++ b/lib/orb/models/plan_version.rb @@ -25,7 +25,7 @@ class PlanVersion < Orb::Internal::Type::BaseModel # Prices for this plan. If the plan has phases, this includes prices across all # phases of the plan. # - # @return [Array] + # @return [Array] required :prices, -> { Orb::Internal::Type::ArrayOf[union: Orb::Price] } # @!attribute version @@ -46,7 +46,7 @@ class PlanVersion < Orb::Internal::Type::BaseModel # # @param plan_phases [Array, nil] # - # @param prices [Array] Prices for this plan. If the plan has phases, this includes prices across all ph + # @param prices [Array] Prices for this plan. If the plan has phases, this includes prices across all ph # # @param version [Integer] diff --git a/lib/orb/models/plans/external_plan_id_update_params.rb b/lib/orb/models/plans/external_plan_id_update_params.rb index 9a1aa5df..8d95d18b 100644 --- a/lib/orb/models/plans/external_plan_id_update_params.rb +++ b/lib/orb/models/plans/external_plan_id_update_params.rb @@ -13,6 +13,12 @@ class ExternalPlanIDUpdateParams < Orb::Internal::Type::BaseModel # @return [String] required :other_external_plan_id, String + # @!attribute description + # An optional user-defined description of the plan. + # + # @return [String, nil] + optional :description, String, nil?: true + # @!attribute external_plan_id # An optional user-defined ID for this plan resource, used throughout the system # as an alias for this Plan. Use this field to identify a plan by an existing @@ -29,12 +35,14 @@ class ExternalPlanIDUpdateParams < Orb::Internal::Type::BaseModel # @return [Hash{Symbol=>String, nil}, nil] optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - # @!method initialize(other_external_plan_id:, external_plan_id: nil, metadata: nil, request_options: {}) + # @!method initialize(other_external_plan_id:, description: nil, external_plan_id: nil, metadata: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::Plans::ExternalPlanIDUpdateParams} for more details. # # @param other_external_plan_id [String] # + # @param description [String, nil] An optional user-defined description of the plan. + # # @param external_plan_id [String, nil] An optional user-defined ID for this plan resource, used throughout the system a # # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed diff --git a/lib/orb/models/plans/migration_cancel_response.rb b/lib/orb/models/plans/migration_cancel_response.rb index 30b66ddd..da50be4b 100644 --- a/lib/orb/models/plans/migration_cancel_response.rb +++ b/lib/orb/models/plans/migration_cancel_response.rb @@ -6,11 +6,14 @@ module Plans # @see Orb::Resources::Plans::Migrations#cancel class MigrationCancelResponse < Orb::Internal::Type::BaseModel # @!attribute id + # Unique identifier for this plan version change. # # @return [String] required :id, String # @!attribute effective_time + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. # # @return [Date, Time, Symbol, Orb::Models::Plans::MigrationCancelResponse::EffectiveTime, nil] required :effective_time, @@ -18,21 +21,33 @@ class MigrationCancelResponse < Orb::Internal::Type::BaseModel nil?: true # @!attribute plan_id + # The ID of the plan being migrated. # # @return [String] required :plan_id, String # @!attribute status + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. # # @return [Symbol, Orb::Models::Plans::MigrationCancelResponse::Status] required :status, enum: -> { Orb::Models::Plans::MigrationCancelResponse::Status } # @!method initialize(id:, effective_time:, plan_id:, status:) - # @param id [String] - # @param effective_time [Date, Time, Symbol, Orb::Models::Plans::MigrationCancelResponse::EffectiveTime, nil] - # @param plan_id [String] - # @param status [Symbol, Orb::Models::Plans::MigrationCancelResponse::Status] + # Some parameter documentations has been truncated, see + # {Orb::Models::Plans::MigrationCancelResponse} for more details. + # + # @param id [String] Unique identifier for this plan version change. + # + # @param effective_time [Date, Time, Symbol, Orb::Models::Plans::MigrationCancelResponse::EffectiveTime, nil] When the migration takes effect. Can be a specific date/time, or 'end_of_term' w + # + # @param plan_id [String] The ID of the plan being migrated. + # + # @param status [Symbol, Orb::Models::Plans::MigrationCancelResponse::Status] Current status of the migration: 'not_started', 'in_progress', 'completed', 'act + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. + # # @see Orb::Models::Plans::MigrationCancelResponse#effective_time module EffectiveTime extend Orb::Internal::Type::Union @@ -57,6 +72,9 @@ module EffectiveTime # @!endgroup end + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. + # # @see Orb::Models::Plans::MigrationCancelResponse#status module Status extend Orb::Internal::Type::Enum diff --git a/lib/orb/models/plans/migration_list_response.rb b/lib/orb/models/plans/migration_list_response.rb index e124171a..2690382f 100644 --- a/lib/orb/models/plans/migration_list_response.rb +++ b/lib/orb/models/plans/migration_list_response.rb @@ -6,11 +6,14 @@ module Plans # @see Orb::Resources::Plans::Migrations#list class MigrationListResponse < Orb::Internal::Type::BaseModel # @!attribute id + # Unique identifier for this plan version change. # # @return [String] required :id, String # @!attribute effective_time + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. # # @return [Date, Time, Symbol, Orb::Models::Plans::MigrationListResponse::EffectiveTime, nil] required :effective_time, @@ -18,21 +21,33 @@ class MigrationListResponse < Orb::Internal::Type::BaseModel nil?: true # @!attribute plan_id + # The ID of the plan being migrated. # # @return [String] required :plan_id, String # @!attribute status + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. # # @return [Symbol, Orb::Models::Plans::MigrationListResponse::Status] required :status, enum: -> { Orb::Models::Plans::MigrationListResponse::Status } # @!method initialize(id:, effective_time:, plan_id:, status:) - # @param id [String] - # @param effective_time [Date, Time, Symbol, Orb::Models::Plans::MigrationListResponse::EffectiveTime, nil] - # @param plan_id [String] - # @param status [Symbol, Orb::Models::Plans::MigrationListResponse::Status] + # Some parameter documentations has been truncated, see + # {Orb::Models::Plans::MigrationListResponse} for more details. + # + # @param id [String] Unique identifier for this plan version change. + # + # @param effective_time [Date, Time, Symbol, Orb::Models::Plans::MigrationListResponse::EffectiveTime, nil] When the migration takes effect. Can be a specific date/time, or 'end_of_term' w + # + # @param plan_id [String] The ID of the plan being migrated. + # + # @param status [Symbol, Orb::Models::Plans::MigrationListResponse::Status] Current status of the migration: 'not_started', 'in_progress', 'completed', 'act + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. + # # @see Orb::Models::Plans::MigrationListResponse#effective_time module EffectiveTime extend Orb::Internal::Type::Union @@ -57,6 +72,9 @@ module EffectiveTime # @!endgroup end + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. + # # @see Orb::Models::Plans::MigrationListResponse#status module Status extend Orb::Internal::Type::Enum diff --git a/lib/orb/models/plans/migration_retrieve_response.rb b/lib/orb/models/plans/migration_retrieve_response.rb index 1cbd07da..e5a123c2 100644 --- a/lib/orb/models/plans/migration_retrieve_response.rb +++ b/lib/orb/models/plans/migration_retrieve_response.rb @@ -6,11 +6,14 @@ module Plans # @see Orb::Resources::Plans::Migrations#retrieve class MigrationRetrieveResponse < Orb::Internal::Type::BaseModel # @!attribute id + # Unique identifier for this plan version change. # # @return [String] required :id, String # @!attribute effective_time + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. # # @return [Date, Time, Symbol, Orb::Models::Plans::MigrationRetrieveResponse::EffectiveTime, nil] required :effective_time, @@ -18,21 +21,33 @@ class MigrationRetrieveResponse < Orb::Internal::Type::BaseModel nil?: true # @!attribute plan_id + # The ID of the plan being migrated. # # @return [String] required :plan_id, String # @!attribute status + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. # # @return [Symbol, Orb::Models::Plans::MigrationRetrieveResponse::Status] required :status, enum: -> { Orb::Models::Plans::MigrationRetrieveResponse::Status } # @!method initialize(id:, effective_time:, plan_id:, status:) - # @param id [String] - # @param effective_time [Date, Time, Symbol, Orb::Models::Plans::MigrationRetrieveResponse::EffectiveTime, nil] - # @param plan_id [String] - # @param status [Symbol, Orb::Models::Plans::MigrationRetrieveResponse::Status] + # Some parameter documentations has been truncated, see + # {Orb::Models::Plans::MigrationRetrieveResponse} for more details. + # + # @param id [String] Unique identifier for this plan version change. + # + # @param effective_time [Date, Time, Symbol, Orb::Models::Plans::MigrationRetrieveResponse::EffectiveTime, nil] When the migration takes effect. Can be a specific date/time, or 'end_of_term' w + # + # @param plan_id [String] The ID of the plan being migrated. + # + # @param status [Symbol, Orb::Models::Plans::MigrationRetrieveResponse::Status] Current status of the migration: 'not_started', 'in_progress', 'completed', 'act + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. + # # @see Orb::Models::Plans::MigrationRetrieveResponse#effective_time module EffectiveTime extend Orb::Internal::Type::Union @@ -57,6 +72,9 @@ module EffectiveTime # @!endgroup end + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. + # # @see Orb::Models::Plans::MigrationRetrieveResponse#status module Status extend Orb::Internal::Type::Enum diff --git a/lib/orb/models/price.rb b/lib/orb/models/price.rb index bfb97a6b..df1135ff 100644 --- a/lib/orb/models/price.rb +++ b/lib/orb/models/price.rb @@ -45,6 +45,8 @@ module Price variant :matrix_with_allocation, -> { Orb::Price::MatrixWithAllocation } + variant :matrix_with_threshold_discounts, -> { Orb::Price::MatrixWithThresholdDiscounts } + variant :tiered_with_proration, -> { Orb::Price::TieredWithProration } variant :unit_with_proration, -> { Orb::Price::UnitWithProration } @@ -73,6 +75,10 @@ module Price variant :cumulative_grouped_allocation, -> { Orb::Price::CumulativeGroupedAllocation } + variant :daily_credit_allowance, -> { Orb::Price::DailyCreditAllowance } + + variant :metered_allowance, -> { Orb::Price::MeteredAllowance } + variant :minimum_composite, -> { Orb::Price::MinimumComposite } variant :percent, -> { Orb::Price::Percent } @@ -5594,7 +5600,7 @@ class LicenseType < Orb::Internal::Type::BaseModel end end - class TieredWithProration < Orb::Internal::Type::BaseModel + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel # @!attribute id # # @return [String] @@ -5612,19 +5618,21 @@ class TieredWithProration < Orb::Internal::Type::BaseModel # @!attribute billing_mode # - # @return [Symbol, Orb::Models::Price::TieredWithProration::BillingMode] - required :billing_mode, enum: -> { Orb::Price::TieredWithProration::BillingMode } + # @return [Symbol, Orb::Models::Price::MatrixWithThresholdDiscounts::BillingMode] + required :billing_mode, enum: -> { Orb::Price::MatrixWithThresholdDiscounts::BillingMode } # @!attribute cadence # - # @return [Symbol, Orb::Models::Price::TieredWithProration::Cadence] - required :cadence, enum: -> { Orb::Price::TieredWithProration::Cadence } + # @return [Symbol, Orb::Models::Price::MatrixWithThresholdDiscounts::Cadence] + required :cadence, enum: -> { Orb::Price::MatrixWithThresholdDiscounts::Cadence } # @!attribute composite_price_filters # - # @return [Array, nil] + # @return [Array, nil] required :composite_price_filters, - -> { Orb::Internal::Type::ArrayOf[Orb::Price::TieredWithProration::CompositePriceFilter] }, + -> { + Orb::Internal::Type::ArrayOf[Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter] + }, nil?: true # @!attribute conversion_rate @@ -5636,7 +5644,7 @@ class TieredWithProration < Orb::Internal::Type::BaseModel # # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] required :conversion_rate_config, - union: -> { Orb::Price::TieredWithProration::ConversionRateConfig }, + union: -> { Orb::Price::MatrixWithThresholdDiscounts::ConversionRateConfig }, nil?: true # @!attribute created_at @@ -5687,6 +5695,13 @@ class TieredWithProration < Orb::Internal::Type::BaseModel # @return [Orb::Models::ItemSlim] required :item, -> { Orb::ItemSlim } + # @!attribute matrix_with_threshold_discounts_config + # Configuration for matrix_with_threshold_discounts pricing + # + # @return [Orb::Models::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] + required :matrix_with_threshold_discounts_config, + -> { Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig } + # @!attribute maximum # @deprecated # @@ -5723,8 +5738,8 @@ class TieredWithProration < Orb::Internal::Type::BaseModel # @!attribute model_type # The pricing model type # - # @return [Symbol, :tiered_with_proration] - required :model_type, const: :tiered_with_proration + # @return [Symbol, :matrix_with_threshold_discounts] + required :model_type, const: :matrix_with_threshold_discounts # @!attribute name # @@ -5738,8 +5753,8 @@ class TieredWithProration < Orb::Internal::Type::BaseModel # @!attribute price_type # - # @return [Symbol, Orb::Models::Price::TieredWithProration::PriceType] - required :price_type, enum: -> { Orb::Price::TieredWithProration::PriceType } + # @return [Symbol, Orb::Models::Price::MatrixWithThresholdDiscounts::PriceType] + required :price_type, enum: -> { Orb::Price::MatrixWithThresholdDiscounts::PriceType } # @!attribute replaces_price_id # The price id this price replaces. This price will take the place of the replaced @@ -5748,12 +5763,6 @@ class TieredWithProration < Orb::Internal::Type::BaseModel # @return [String, nil] required :replaces_price_id, String, nil?: true - # @!attribute tiered_with_proration_config - # Configuration for tiered_with_proration pricing - # - # @return [Orb::Models::Price::TieredWithProration::TieredWithProrationConfig] - required :tiered_with_proration_config, -> { Orb::Price::TieredWithProration::TieredWithProrationConfig } - # @!attribute dimensional_price_configuration # # @return [Orb::Models::DimensionalPriceConfiguration, nil] @@ -5764,12 +5773,12 @@ class TieredWithProration < Orb::Internal::Type::BaseModel # users. License types are used during billing by grouping metrics on the # configured grouping key. # - # @return [Orb::Models::Price::TieredWithProration::LicenseType, nil] - optional :license_type, -> { Orb::Price::TieredWithProration::LicenseType }, nil?: true + # @return [Orb::Models::Price::MatrixWithThresholdDiscounts::LicenseType, nil] + optional :license_type, -> { Orb::Price::MatrixWithThresholdDiscounts::LicenseType }, nil?: true - # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, discount:, external_price_id:, fixed_price_quantity:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, tiered_with_proration_config:, dimensional_price_configuration: nil, license_type: nil, model_type: :tiered_with_proration) + # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, discount:, external_price_id:, fixed_price_quantity:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, matrix_with_threshold_discounts_config:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, dimensional_price_configuration: nil, license_type: nil, model_type: :matrix_with_threshold_discounts) # Some parameter documentations has been truncated, see - # {Orb::Models::Price::TieredWithProration} for more details. + # {Orb::Models::Price::MatrixWithThresholdDiscounts} for more details. # # @param id [String] # @@ -5777,11 +5786,11 @@ class TieredWithProration < Orb::Internal::Type::BaseModel # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfiguration] # - # @param billing_mode [Symbol, Orb::Models::Price::TieredWithProration::BillingMode] + # @param billing_mode [Symbol, Orb::Models::Price::MatrixWithThresholdDiscounts::BillingMode] # - # @param cadence [Symbol, Orb::Models::Price::TieredWithProration::Cadence] + # @param cadence [Symbol, Orb::Models::Price::MatrixWithThresholdDiscounts::Cadence] # - # @param composite_price_filters [Array, nil] + # @param composite_price_filters [Array, nil] # # @param conversion_rate [Float, nil] # @@ -5805,6 +5814,8 @@ class TieredWithProration < Orb::Internal::Type::BaseModel # # @param item [Orb::Models::ItemSlim] A minimal representation of an Item containing only the essential identifying in # + # @param matrix_with_threshold_discounts_config [Orb::Models::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing + # # @param maximum [Orb::Models::Maximum, nil] # # @param maximum_amount [String, nil] @@ -5819,19 +5830,17 @@ class TieredWithProration < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] # - # @param price_type [Symbol, Orb::Models::Price::TieredWithProration::PriceType] + # @param price_type [Symbol, Orb::Models::Price::MatrixWithThresholdDiscounts::PriceType] # # @param replaces_price_id [String, nil] The price id this price replaces. This price will take the place of the replaced # - # @param tiered_with_proration_config [Orb::Models::Price::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfiguration, nil] # - # @param license_type [Orb::Models::Price::TieredWithProration::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us + # @param license_type [Orb::Models::Price::MatrixWithThresholdDiscounts::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us # - # @param model_type [Symbol, :tiered_with_proration] The pricing model type + # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type - # @see Orb::Models::Price::TieredWithProration#billing_mode + # @see Orb::Models::Price::MatrixWithThresholdDiscounts#billing_mode module BillingMode extend Orb::Internal::Type::Enum @@ -5842,7 +5851,7 @@ module BillingMode # @return [Array] end - # @see Orb::Models::Price::TieredWithProration#cadence + # @see Orb::Models::Price::MatrixWithThresholdDiscounts#cadence module Cadence extend Orb::Internal::Type::Enum @@ -5861,14 +5870,14 @@ class CompositePriceFilter < Orb::Internal::Type::BaseModel # @!attribute field # The property of the price to filter on. # - # @return [Symbol, Orb::Models::Price::TieredWithProration::CompositePriceFilter::Field] - required :field, enum: -> { Orb::Price::TieredWithProration::CompositePriceFilter::Field } + # @return [Symbol, Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Field] + required :field, enum: -> { Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Field } # @!attribute operator # Should prices that match the filter be included or excluded. # - # @return [Symbol, Orb::Models::Price::TieredWithProration::CompositePriceFilter::Operator] - required :operator, enum: -> { Orb::Price::TieredWithProration::CompositePriceFilter::Operator } + # @return [Symbol, Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Operator] + required :operator, enum: -> { Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Operator } # @!attribute values # The IDs or values that match this filter. @@ -5877,15 +5886,15 @@ class CompositePriceFilter < Orb::Internal::Type::BaseModel required :values, Orb::Internal::Type::ArrayOf[String] # @!method initialize(field:, operator:, values:) - # @param field [Symbol, Orb::Models::Price::TieredWithProration::CompositePriceFilter::Field] The property of the price to filter on. + # @param field [Symbol, Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Field] The property of the price to filter on. # - # @param operator [Symbol, Orb::Models::Price::TieredWithProration::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. + # @param operator [Symbol, Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. # # @param values [Array] The IDs or values that match this filter. # The property of the price to filter on. # - # @see Orb::Models::Price::TieredWithProration::CompositePriceFilter#field + # @see Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter#field module Field extend Orb::Internal::Type::Enum @@ -5901,7 +5910,7 @@ module Field # Should prices that match the filter be included or excluded. # - # @see Orb::Models::Price::TieredWithProration::CompositePriceFilter#operator + # @see Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter#operator module Operator extend Orb::Internal::Type::Enum @@ -5913,60 +5922,136 @@ module Operator end end - # @see Orb::Models::Price::TieredWithProration#price_type - module PriceType - extend Orb::Internal::Type::Enum + # @see Orb::Models::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + # @!attribute default_unit_amount + # Unit price used for usage that does not match any defined matrix cell. + # + # @return [String] + required :default_unit_amount, String - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - COMPOSITE_PRICE = :composite_price + # @!attribute first_dimension + # First matrix dimension key. + # + # @return [String] + required :first_dimension, String - # @!method self.values - # @return [Array] - end + # @!attribute matrix_values + # Per-cell unit prices. + # + # @return [Array] + required :matrix_values, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] } - # @see Orb::Models::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 + # @!attribute second_dimension + # Optional second matrix dimension key. # - # @return [Array] - required :tiers, - -> { Orb::Internal::Type::ArrayOf[Orb::Price::TieredWithProration::TieredWithProrationConfig::Tier] } + # @return [String, nil] + optional :second_dimension, String, nil?: true - # @!method initialize(tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Price::TieredWithProration::TieredWithProrationConfig} for more - # details. + # @!attribute threshold_discount_groups # - # Configuration for tiered_with_proration pricing + # @return [Array, nil] + optional :threshold_discount_groups, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] } + + # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil) + # Configuration for matrix_with_threshold_discounts pricing # - # @param tiers [Array] Tiers for rating based on total usage quantities into the specified tier with pr + # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell. + # + # @param first_dimension [String] First matrix dimension key. + # + # @param matrix_values [Array] Per-cell unit prices. + # + # @param second_dimension [String, nil] Optional second matrix dimension key. + # + # @param threshold_discount_groups [Array] - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # Inclusive tier starting value + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute first_dimension_value # # @return [String] - required :tier_lower_bound, String + required :first_dimension_value, 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 + # @!attribute second_dimension_value # - # @param tier_lower_bound [String] Inclusive tier starting value + # @return [String, nil] + optional :second_dimension_value, String, nil?: true + + # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil) + # @param first_dimension_value [String] + # @param unit_amount [String] + # @param second_dimension_value [String, nil] + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + # @!attribute above_threshold_discount_percentage + # Discount rate applied to spend above the threshold. # - # @param unit_amount [String] Amount per unit + # @return [String] + required :above_threshold_discount_percentage, String + + # @!attribute below_threshold_discount_percentage + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + # + # @return [String] + required :below_threshold_discount_percentage, String + + # @!attribute cell_coordinates + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + # + # @return [String] + required :cell_coordinates, String + + # @!attribute threshold_amount + # + # @return [String] + required :threshold_amount, String + + # @!attribute description + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup} + # for more details. + # + # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold. + # + # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli + # + # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # + # @param threshold_amount [String] + # + # @param description [String, nil] end end - # @see Orb::Models::Price::TieredWithProration#license_type + # @see Orb::Models::Price::MatrixWithThresholdDiscounts#price_type + module PriceType + extend Orb::Internal::Type::Enum + + USAGE_PRICE = :usage_price + FIXED_PRICE = :fixed_price + COMPOSITE_PRICE = :composite_price + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::Price::MatrixWithThresholdDiscounts#license_type class LicenseType < Orb::Internal::Type::BaseModel # @!attribute id # The Orb-assigned unique identifier for the license type. @@ -5989,7 +6074,8 @@ class LicenseType < Orb::Internal::Type::BaseModel # @!method initialize(id:, grouping_key:, name:) # Some parameter documentations has been truncated, see - # {Orb::Models::Price::TieredWithProration::LicenseType} for more details. + # {Orb::Models::Price::MatrixWithThresholdDiscounts::LicenseType} for more + # details. # # The LicenseType resource represents a type of license that can be assigned to # users. License types are used during billing by grouping metrics on the @@ -6003,7 +6089,7 @@ class LicenseType < Orb::Internal::Type::BaseModel end end - class UnitWithProration < Orb::Internal::Type::BaseModel + class TieredWithProration < Orb::Internal::Type::BaseModel # @!attribute id # # @return [String] @@ -6021,19 +6107,19 @@ class UnitWithProration < Orb::Internal::Type::BaseModel # @!attribute billing_mode # - # @return [Symbol, Orb::Models::Price::UnitWithProration::BillingMode] - required :billing_mode, enum: -> { Orb::Price::UnitWithProration::BillingMode } + # @return [Symbol, Orb::Models::Price::TieredWithProration::BillingMode] + required :billing_mode, enum: -> { Orb::Price::TieredWithProration::BillingMode } # @!attribute cadence # - # @return [Symbol, Orb::Models::Price::UnitWithProration::Cadence] - required :cadence, enum: -> { Orb::Price::UnitWithProration::Cadence } + # @return [Symbol, Orb::Models::Price::TieredWithProration::Cadence] + required :cadence, enum: -> { Orb::Price::TieredWithProration::Cadence } # @!attribute composite_price_filters # - # @return [Array, nil] + # @return [Array, nil] required :composite_price_filters, - -> { Orb::Internal::Type::ArrayOf[Orb::Price::UnitWithProration::CompositePriceFilter] }, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::TieredWithProration::CompositePriceFilter] }, nil?: true # @!attribute conversion_rate @@ -6045,7 +6131,7 @@ class UnitWithProration < Orb::Internal::Type::BaseModel # # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] required :conversion_rate_config, - union: -> { Orb::Price::UnitWithProration::ConversionRateConfig }, + union: -> { Orb::Price::TieredWithProration::ConversionRateConfig }, nil?: true # @!attribute created_at @@ -6132,8 +6218,8 @@ class UnitWithProration < Orb::Internal::Type::BaseModel # @!attribute model_type # The pricing model type # - # @return [Symbol, :unit_with_proration] - required :model_type, const: :unit_with_proration + # @return [Symbol, :tiered_with_proration] + required :model_type, const: :tiered_with_proration # @!attribute name # @@ -6147,8 +6233,8 @@ class UnitWithProration < Orb::Internal::Type::BaseModel # @!attribute price_type # - # @return [Symbol, Orb::Models::Price::UnitWithProration::PriceType] - required :price_type, enum: -> { Orb::Price::UnitWithProration::PriceType } + # @return [Symbol, Orb::Models::Price::TieredWithProration::PriceType] + required :price_type, enum: -> { Orb::Price::TieredWithProration::PriceType } # @!attribute replaces_price_id # The price id this price replaces. This price will take the place of the replaced @@ -6157,11 +6243,11 @@ class UnitWithProration < Orb::Internal::Type::BaseModel # @return [String, nil] required :replaces_price_id, String, nil?: true - # @!attribute unit_with_proration_config - # Configuration for unit_with_proration pricing + # @!attribute tiered_with_proration_config + # Configuration for tiered_with_proration pricing # - # @return [Orb::Models::Price::UnitWithProration::UnitWithProrationConfig] - required :unit_with_proration_config, -> { Orb::Price::UnitWithProration::UnitWithProrationConfig } + # @return [Orb::Models::Price::TieredWithProration::TieredWithProrationConfig] + required :tiered_with_proration_config, -> { Orb::Price::TieredWithProration::TieredWithProrationConfig } # @!attribute dimensional_price_configuration # @@ -6173,12 +6259,12 @@ class UnitWithProration < Orb::Internal::Type::BaseModel # users. License types are used during billing by grouping metrics on the # configured grouping key. # - # @return [Orb::Models::Price::UnitWithProration::LicenseType, nil] - optional :license_type, -> { Orb::Price::UnitWithProration::LicenseType }, nil?: true + # @return [Orb::Models::Price::TieredWithProration::LicenseType, nil] + optional :license_type, -> { Orb::Price::TieredWithProration::LicenseType }, nil?: true - # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, discount:, external_price_id:, fixed_price_quantity:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, unit_with_proration_config:, dimensional_price_configuration: nil, license_type: nil, model_type: :unit_with_proration) + # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, discount:, external_price_id:, fixed_price_quantity:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, tiered_with_proration_config:, dimensional_price_configuration: nil, license_type: nil, model_type: :tiered_with_proration) # Some parameter documentations has been truncated, see - # {Orb::Models::Price::UnitWithProration} for more details. + # {Orb::Models::Price::TieredWithProration} for more details. # # @param id [String] # @@ -6186,11 +6272,11 @@ class UnitWithProration < Orb::Internal::Type::BaseModel # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfiguration] # - # @param billing_mode [Symbol, Orb::Models::Price::UnitWithProration::BillingMode] + # @param billing_mode [Symbol, Orb::Models::Price::TieredWithProration::BillingMode] # - # @param cadence [Symbol, Orb::Models::Price::UnitWithProration::Cadence] + # @param cadence [Symbol, Orb::Models::Price::TieredWithProration::Cadence] # - # @param composite_price_filters [Array, nil] + # @param composite_price_filters [Array, nil] # # @param conversion_rate [Float, nil] # @@ -6228,19 +6314,19 @@ class UnitWithProration < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] # - # @param price_type [Symbol, Orb::Models::Price::UnitWithProration::PriceType] + # @param price_type [Symbol, Orb::Models::Price::TieredWithProration::PriceType] # # @param replaces_price_id [String, nil] The price id this price replaces. This price will take the place of the replaced # - # @param unit_with_proration_config [Orb::Models::Price::UnitWithProration::UnitWithProrationConfig] Configuration for unit_with_proration pricing + # @param tiered_with_proration_config [Orb::Models::Price::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfiguration, nil] # - # @param license_type [Orb::Models::Price::UnitWithProration::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us + # @param license_type [Orb::Models::Price::TieredWithProration::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us # - # @param model_type [Symbol, :unit_with_proration] The pricing model type + # @param model_type [Symbol, :tiered_with_proration] The pricing model type - # @see Orb::Models::Price::UnitWithProration#billing_mode + # @see Orb::Models::Price::TieredWithProration#billing_mode module BillingMode extend Orb::Internal::Type::Enum @@ -6251,7 +6337,7 @@ module BillingMode # @return [Array] end - # @see Orb::Models::Price::UnitWithProration#cadence + # @see Orb::Models::Price::TieredWithProration#cadence module Cadence extend Orb::Internal::Type::Enum @@ -6270,14 +6356,14 @@ class CompositePriceFilter < Orb::Internal::Type::BaseModel # @!attribute field # The property of the price to filter on. # - # @return [Symbol, Orb::Models::Price::UnitWithProration::CompositePriceFilter::Field] - required :field, enum: -> { Orb::Price::UnitWithProration::CompositePriceFilter::Field } + # @return [Symbol, Orb::Models::Price::TieredWithProration::CompositePriceFilter::Field] + required :field, enum: -> { Orb::Price::TieredWithProration::CompositePriceFilter::Field } # @!attribute operator # Should prices that match the filter be included or excluded. # - # @return [Symbol, Orb::Models::Price::UnitWithProration::CompositePriceFilter::Operator] - required :operator, enum: -> { Orb::Price::UnitWithProration::CompositePriceFilter::Operator } + # @return [Symbol, Orb::Models::Price::TieredWithProration::CompositePriceFilter::Operator] + required :operator, enum: -> { Orb::Price::TieredWithProration::CompositePriceFilter::Operator } # @!attribute values # The IDs or values that match this filter. @@ -6286,15 +6372,15 @@ class CompositePriceFilter < Orb::Internal::Type::BaseModel required :values, Orb::Internal::Type::ArrayOf[String] # @!method initialize(field:, operator:, values:) - # @param field [Symbol, Orb::Models::Price::UnitWithProration::CompositePriceFilter::Field] The property of the price to filter on. + # @param field [Symbol, Orb::Models::Price::TieredWithProration::CompositePriceFilter::Field] The property of the price to filter on. # - # @param operator [Symbol, Orb::Models::Price::UnitWithProration::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. + # @param operator [Symbol, Orb::Models::Price::TieredWithProration::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. # # @param values [Array] The IDs or values that match this filter. # The property of the price to filter on. # - # @see Orb::Models::Price::UnitWithProration::CompositePriceFilter#field + # @see Orb::Models::Price::TieredWithProration::CompositePriceFilter#field module Field extend Orb::Internal::Type::Enum @@ -6310,7 +6396,7 @@ module Field # Should prices that match the filter be included or excluded. # - # @see Orb::Models::Price::UnitWithProration::CompositePriceFilter#operator + # @see Orb::Models::Price::TieredWithProration::CompositePriceFilter#operator module Operator extend Orb::Internal::Type::Enum @@ -6322,7 +6408,7 @@ module Operator end end - # @see Orb::Models::Price::UnitWithProration#price_type + # @see Orb::Models::Price::TieredWithProration#price_type module PriceType extend Orb::Internal::Type::Enum @@ -6334,44 +6420,71 @@ module PriceType # @return [Array] end - # @see Orb::Models::Price::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 + # @see Orb::Models::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 # - # @param unit_amount [String] Rate per unit of usage - end + # @return [Array] + required :tiers, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::TieredWithProration::TieredWithProrationConfig::Tier] } - # @see Orb::Models::Price::UnitWithProration#license_type - class LicenseType < Orb::Internal::Type::BaseModel - # @!attribute id - # The Orb-assigned unique identifier for the license type. + # @!method initialize(tiers:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::TieredWithProration::TieredWithProrationConfig} for more + # details. # - # @return [String] - required :id, String - - # @!attribute grouping_key - # The key used for grouping licenses of this type. This is typically a user - # identifier field. + # Configuration for tiered_with_proration pricing # - # @return [String] - required :grouping_key, String + # @param tiers [Array] Tiers for rating based on total usage quantities into the specified tier with pr - # @!attribute name - # The name of the license type. - # + 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 + + # @see Orb::Models::Price::TieredWithProration#license_type + class LicenseType < Orb::Internal::Type::BaseModel + # @!attribute id + # The Orb-assigned unique identifier for the license type. + # + # @return [String] + required :id, String + + # @!attribute grouping_key + # The key used for grouping licenses of this type. This is typically a user + # identifier field. + # + # @return [String] + required :grouping_key, String + + # @!attribute name + # The name of the license type. + # # @return [String] required :name, String # @!method initialize(id:, grouping_key:, name:) # Some parameter documentations has been truncated, see - # {Orb::Models::Price::UnitWithProration::LicenseType} for more details. + # {Orb::Models::Price::TieredWithProration::LicenseType} for more details. # # The LicenseType resource represents a type of license that can be assigned to # users. License types are used during billing by grouping metrics on the @@ -6385,7 +6498,7 @@ class LicenseType < Orb::Internal::Type::BaseModel end end - class GroupedAllocation < Orb::Internal::Type::BaseModel + class UnitWithProration < Orb::Internal::Type::BaseModel # @!attribute id # # @return [String] @@ -6403,19 +6516,19 @@ class GroupedAllocation < Orb::Internal::Type::BaseModel # @!attribute billing_mode # - # @return [Symbol, Orb::Models::Price::GroupedAllocation::BillingMode] - required :billing_mode, enum: -> { Orb::Price::GroupedAllocation::BillingMode } + # @return [Symbol, Orb::Models::Price::UnitWithProration::BillingMode] + required :billing_mode, enum: -> { Orb::Price::UnitWithProration::BillingMode } # @!attribute cadence # - # @return [Symbol, Orb::Models::Price::GroupedAllocation::Cadence] - required :cadence, enum: -> { Orb::Price::GroupedAllocation::Cadence } + # @return [Symbol, Orb::Models::Price::UnitWithProration::Cadence] + required :cadence, enum: -> { Orb::Price::UnitWithProration::Cadence } # @!attribute composite_price_filters # - # @return [Array, nil] + # @return [Array, nil] required :composite_price_filters, - -> { Orb::Internal::Type::ArrayOf[Orb::Price::GroupedAllocation::CompositePriceFilter] }, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::UnitWithProration::CompositePriceFilter] }, nil?: true # @!attribute conversion_rate @@ -6427,7 +6540,7 @@ class GroupedAllocation < Orb::Internal::Type::BaseModel # # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] required :conversion_rate_config, - union: -> { Orb::Price::GroupedAllocation::ConversionRateConfig }, + union: -> { Orb::Price::UnitWithProration::ConversionRateConfig }, nil?: true # @!attribute created_at @@ -6461,12 +6574,6 @@ class GroupedAllocation < Orb::Internal::Type::BaseModel # @return [Float, nil] required :fixed_price_quantity, Float, nil?: true - # @!attribute grouped_allocation_config - # Configuration for grouped_allocation pricing - # - # @return [Orb::Models::Price::GroupedAllocation::GroupedAllocationConfig] - required :grouped_allocation_config, -> { Orb::Price::GroupedAllocation::GroupedAllocationConfig } - # @!attribute invoice_grouping_key # # @return [String, nil] @@ -6520,8 +6627,8 @@ class GroupedAllocation < Orb::Internal::Type::BaseModel # @!attribute model_type # The pricing model type # - # @return [Symbol, :grouped_allocation] - required :model_type, const: :grouped_allocation + # @return [Symbol, :unit_with_proration] + required :model_type, const: :unit_with_proration # @!attribute name # @@ -6535,8 +6642,8 @@ class GroupedAllocation < Orb::Internal::Type::BaseModel # @!attribute price_type # - # @return [Symbol, Orb::Models::Price::GroupedAllocation::PriceType] - required :price_type, enum: -> { Orb::Price::GroupedAllocation::PriceType } + # @return [Symbol, Orb::Models::Price::UnitWithProration::PriceType] + required :price_type, enum: -> { Orb::Price::UnitWithProration::PriceType } # @!attribute replaces_price_id # The price id this price replaces. This price will take the place of the replaced @@ -6545,6 +6652,12 @@ class GroupedAllocation < Orb::Internal::Type::BaseModel # @return [String, nil] required :replaces_price_id, String, nil?: true + # @!attribute unit_with_proration_config + # Configuration for unit_with_proration pricing + # + # @return [Orb::Models::Price::UnitWithProration::UnitWithProrationConfig] + required :unit_with_proration_config, -> { Orb::Price::UnitWithProration::UnitWithProrationConfig } + # @!attribute dimensional_price_configuration # # @return [Orb::Models::DimensionalPriceConfiguration, nil] @@ -6555,12 +6668,12 @@ class GroupedAllocation < Orb::Internal::Type::BaseModel # users. License types are used during billing by grouping metrics on the # configured grouping key. # - # @return [Orb::Models::Price::GroupedAllocation::LicenseType, nil] - optional :license_type, -> { Orb::Price::GroupedAllocation::LicenseType }, nil?: true + # @return [Orb::Models::Price::UnitWithProration::LicenseType, nil] + optional :license_type, -> { Orb::Price::UnitWithProration::LicenseType }, nil?: true - # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, discount:, external_price_id:, fixed_price_quantity:, grouped_allocation_config:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, dimensional_price_configuration: nil, license_type: nil, model_type: :grouped_allocation) + # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, discount:, external_price_id:, fixed_price_quantity:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, unit_with_proration_config:, dimensional_price_configuration: nil, license_type: nil, model_type: :unit_with_proration) # Some parameter documentations has been truncated, see - # {Orb::Models::Price::GroupedAllocation} for more details. + # {Orb::Models::Price::UnitWithProration} for more details. # # @param id [String] # @@ -6568,11 +6681,11 @@ class GroupedAllocation < Orb::Internal::Type::BaseModel # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfiguration] # - # @param billing_mode [Symbol, Orb::Models::Price::GroupedAllocation::BillingMode] + # @param billing_mode [Symbol, Orb::Models::Price::UnitWithProration::BillingMode] # - # @param cadence [Symbol, Orb::Models::Price::GroupedAllocation::Cadence] + # @param cadence [Symbol, Orb::Models::Price::UnitWithProration::Cadence] # - # @param composite_price_filters [Array, nil] + # @param composite_price_filters [Array, nil] # # @param conversion_rate [Float, nil] # @@ -6590,8 +6703,6 @@ class GroupedAllocation < Orb::Internal::Type::BaseModel # # @param fixed_price_quantity [Float, nil] # - # @param grouped_allocation_config [Orb::Models::Price::GroupedAllocation::GroupedAllocationConfig] Configuration for grouped_allocation pricing - # # @param invoice_grouping_key [String, nil] # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfiguration, nil] @@ -6612,17 +6723,19 @@ class GroupedAllocation < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] # - # @param price_type [Symbol, Orb::Models::Price::GroupedAllocation::PriceType] + # @param price_type [Symbol, Orb::Models::Price::UnitWithProration::PriceType] # # @param replaces_price_id [String, nil] The price id this price replaces. This price will take the place of the replaced # + # @param unit_with_proration_config [Orb::Models::Price::UnitWithProration::UnitWithProrationConfig] Configuration for unit_with_proration pricing + # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfiguration, nil] # - # @param license_type [Orb::Models::Price::GroupedAllocation::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us + # @param license_type [Orb::Models::Price::UnitWithProration::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us # - # @param model_type [Symbol, :grouped_allocation] The pricing model type + # @param model_type [Symbol, :unit_with_proration] The pricing model type - # @see Orb::Models::Price::GroupedAllocation#billing_mode + # @see Orb::Models::Price::UnitWithProration#billing_mode module BillingMode extend Orb::Internal::Type::Enum @@ -6633,7 +6746,7 @@ module BillingMode # @return [Array] end - # @see Orb::Models::Price::GroupedAllocation#cadence + # @see Orb::Models::Price::UnitWithProration#cadence module Cadence extend Orb::Internal::Type::Enum @@ -6652,14 +6765,14 @@ class CompositePriceFilter < Orb::Internal::Type::BaseModel # @!attribute field # The property of the price to filter on. # - # @return [Symbol, Orb::Models::Price::GroupedAllocation::CompositePriceFilter::Field] - required :field, enum: -> { Orb::Price::GroupedAllocation::CompositePriceFilter::Field } + # @return [Symbol, Orb::Models::Price::UnitWithProration::CompositePriceFilter::Field] + required :field, enum: -> { Orb::Price::UnitWithProration::CompositePriceFilter::Field } # @!attribute operator # Should prices that match the filter be included or excluded. # - # @return [Symbol, Orb::Models::Price::GroupedAllocation::CompositePriceFilter::Operator] - required :operator, enum: -> { Orb::Price::GroupedAllocation::CompositePriceFilter::Operator } + # @return [Symbol, Orb::Models::Price::UnitWithProration::CompositePriceFilter::Operator] + required :operator, enum: -> { Orb::Price::UnitWithProration::CompositePriceFilter::Operator } # @!attribute values # The IDs or values that match this filter. @@ -6668,15 +6781,15 @@ class CompositePriceFilter < Orb::Internal::Type::BaseModel required :values, Orb::Internal::Type::ArrayOf[String] # @!method initialize(field:, operator:, values:) - # @param field [Symbol, Orb::Models::Price::GroupedAllocation::CompositePriceFilter::Field] The property of the price to filter on. + # @param field [Symbol, Orb::Models::Price::UnitWithProration::CompositePriceFilter::Field] The property of the price to filter on. # - # @param operator [Symbol, Orb::Models::Price::GroupedAllocation::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. + # @param operator [Symbol, Orb::Models::Price::UnitWithProration::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. # # @param values [Array] The IDs or values that match this filter. # The property of the price to filter on. # - # @see Orb::Models::Price::GroupedAllocation::CompositePriceFilter#field + # @see Orb::Models::Price::UnitWithProration::CompositePriceFilter#field module Field extend Orb::Internal::Type::Enum @@ -6692,7 +6805,7 @@ module Field # Should prices that match the filter be included or excluded. # - # @see Orb::Models::Price::GroupedAllocation::CompositePriceFilter#operator + # @see Orb::Models::Price::UnitWithProration::CompositePriceFilter#operator module Operator extend Orb::Internal::Type::Enum @@ -6704,37 +6817,7 @@ module Operator end end - # @see Orb::Models::Price::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 - - # @see Orb::Models::Price::GroupedAllocation#price_type + # @see Orb::Models::Price::UnitWithProration#price_type module PriceType extend Orb::Internal::Type::Enum @@ -6746,7 +6829,21 @@ module PriceType # @return [Array] end - # @see Orb::Models::Price::GroupedAllocation#license_type + # @see Orb::Models::Price::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 + + # @see Orb::Models::Price::UnitWithProration#license_type class LicenseType < Orb::Internal::Type::BaseModel # @!attribute id # The Orb-assigned unique identifier for the license type. @@ -6769,7 +6866,7 @@ class LicenseType < Orb::Internal::Type::BaseModel # @!method initialize(id:, grouping_key:, name:) # Some parameter documentations has been truncated, see - # {Orb::Models::Price::GroupedAllocation::LicenseType} for more details. + # {Orb::Models::Price::UnitWithProration::LicenseType} for more details. # # The LicenseType resource represents a type of license that can be assigned to # users. License types are used during billing by grouping metrics on the @@ -6783,7 +6880,7 @@ class LicenseType < Orb::Internal::Type::BaseModel end end - class BulkWithProration < Orb::Internal::Type::BaseModel + class GroupedAllocation < Orb::Internal::Type::BaseModel # @!attribute id # # @return [String] @@ -6801,25 +6898,19 @@ class BulkWithProration < Orb::Internal::Type::BaseModel # @!attribute billing_mode # - # @return [Symbol, Orb::Models::Price::BulkWithProration::BillingMode] - required :billing_mode, enum: -> { Orb::Price::BulkWithProration::BillingMode } - - # @!attribute bulk_with_proration_config - # Configuration for bulk_with_proration pricing - # - # @return [Orb::Models::Price::BulkWithProration::BulkWithProrationConfig] - required :bulk_with_proration_config, -> { Orb::Price::BulkWithProration::BulkWithProrationConfig } + # @return [Symbol, Orb::Models::Price::GroupedAllocation::BillingMode] + required :billing_mode, enum: -> { Orb::Price::GroupedAllocation::BillingMode } # @!attribute cadence # - # @return [Symbol, Orb::Models::Price::BulkWithProration::Cadence] - required :cadence, enum: -> { Orb::Price::BulkWithProration::Cadence } + # @return [Symbol, Orb::Models::Price::GroupedAllocation::Cadence] + required :cadence, enum: -> { Orb::Price::GroupedAllocation::Cadence } # @!attribute composite_price_filters # - # @return [Array, nil] + # @return [Array, nil] required :composite_price_filters, - -> { Orb::Internal::Type::ArrayOf[Orb::Price::BulkWithProration::CompositePriceFilter] }, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::GroupedAllocation::CompositePriceFilter] }, nil?: true # @!attribute conversion_rate @@ -6831,7 +6922,7 @@ class BulkWithProration < Orb::Internal::Type::BaseModel # # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] required :conversion_rate_config, - union: -> { Orb::Price::BulkWithProration::ConversionRateConfig }, + union: -> { Orb::Price::GroupedAllocation::ConversionRateConfig }, nil?: true # @!attribute created_at @@ -6865,6 +6956,12 @@ class BulkWithProration < Orb::Internal::Type::BaseModel # @return [Float, nil] required :fixed_price_quantity, Float, nil?: true + # @!attribute grouped_allocation_config + # Configuration for grouped_allocation pricing + # + # @return [Orb::Models::Price::GroupedAllocation::GroupedAllocationConfig] + required :grouped_allocation_config, -> { Orb::Price::GroupedAllocation::GroupedAllocationConfig } + # @!attribute invoice_grouping_key # # @return [String, nil] @@ -6918,8 +7015,8 @@ class BulkWithProration < Orb::Internal::Type::BaseModel # @!attribute model_type # The pricing model type # - # @return [Symbol, :bulk_with_proration] - required :model_type, const: :bulk_with_proration + # @return [Symbol, :grouped_allocation] + required :model_type, const: :grouped_allocation # @!attribute name # @@ -6933,8 +7030,8 @@ class BulkWithProration < Orb::Internal::Type::BaseModel # @!attribute price_type # - # @return [Symbol, Orb::Models::Price::BulkWithProration::PriceType] - required :price_type, enum: -> { Orb::Price::BulkWithProration::PriceType } + # @return [Symbol, Orb::Models::Price::GroupedAllocation::PriceType] + required :price_type, enum: -> { Orb::Price::GroupedAllocation::PriceType } # @!attribute replaces_price_id # The price id this price replaces. This price will take the place of the replaced @@ -6953,12 +7050,12 @@ class BulkWithProration < Orb::Internal::Type::BaseModel # users. License types are used during billing by grouping metrics on the # configured grouping key. # - # @return [Orb::Models::Price::BulkWithProration::LicenseType, nil] - optional :license_type, -> { Orb::Price::BulkWithProration::LicenseType }, nil?: true + # @return [Orb::Models::Price::GroupedAllocation::LicenseType, nil] + optional :license_type, -> { Orb::Price::GroupedAllocation::LicenseType }, nil?: true - # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, bulk_with_proration_config:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, discount:, external_price_id:, fixed_price_quantity:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, dimensional_price_configuration: nil, license_type: nil, model_type: :bulk_with_proration) + # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, discount:, external_price_id:, fixed_price_quantity:, grouped_allocation_config:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, dimensional_price_configuration: nil, license_type: nil, model_type: :grouped_allocation) # Some parameter documentations has been truncated, see - # {Orb::Models::Price::BulkWithProration} for more details. + # {Orb::Models::Price::GroupedAllocation} for more details. # # @param id [String] # @@ -6966,13 +7063,11 @@ class BulkWithProration < Orb::Internal::Type::BaseModel # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfiguration] # - # @param billing_mode [Symbol, Orb::Models::Price::BulkWithProration::BillingMode] - # - # @param bulk_with_proration_config [Orb::Models::Price::BulkWithProration::BulkWithProrationConfig] Configuration for bulk_with_proration pricing + # @param billing_mode [Symbol, Orb::Models::Price::GroupedAllocation::BillingMode] # - # @param cadence [Symbol, Orb::Models::Price::BulkWithProration::Cadence] + # @param cadence [Symbol, Orb::Models::Price::GroupedAllocation::Cadence] # - # @param composite_price_filters [Array, nil] + # @param composite_price_filters [Array, nil] # # @param conversion_rate [Float, nil] # @@ -6990,6 +7085,8 @@ class BulkWithProration < Orb::Internal::Type::BaseModel # # @param fixed_price_quantity [Float, nil] # + # @param grouped_allocation_config [Orb::Models::Price::GroupedAllocation::GroupedAllocationConfig] Configuration for grouped_allocation pricing + # # @param invoice_grouping_key [String, nil] # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfiguration, nil] @@ -7010,17 +7107,17 @@ class BulkWithProration < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] # - # @param price_type [Symbol, Orb::Models::Price::BulkWithProration::PriceType] + # @param price_type [Symbol, Orb::Models::Price::GroupedAllocation::PriceType] # # @param replaces_price_id [String, nil] The price id this price replaces. This price will take the place of the replaced # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfiguration, nil] # - # @param license_type [Orb::Models::Price::BulkWithProration::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us + # @param license_type [Orb::Models::Price::GroupedAllocation::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us # - # @param model_type [Symbol, :bulk_with_proration] The pricing model type + # @param model_type [Symbol, :grouped_allocation] The pricing model type - # @see Orb::Models::Price::BulkWithProration#billing_mode + # @see Orb::Models::Price::GroupedAllocation#billing_mode module BillingMode extend Orb::Internal::Type::Enum @@ -7031,52 +7128,16 @@ module BillingMode # @return [Array] end - # @see Orb::Models::Price::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::Price::BulkWithProration::BulkWithProrationConfig::Tier] } + # @see Orb::Models::Price::GroupedAllocation#cadence + module Cadence + extend Orb::Internal::Type::Enum - # @!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 - - # @see Orb::Models::Price::BulkWithProration#cadence - module Cadence - extend Orb::Internal::Type::Enum - - ONE_TIME = :one_time - MONTHLY = :monthly - QUARTERLY = :quarterly - SEMI_ANNUAL = :semi_annual - ANNUAL = :annual - CUSTOM = :custom + ONE_TIME = :one_time + MONTHLY = :monthly + QUARTERLY = :quarterly + SEMI_ANNUAL = :semi_annual + ANNUAL = :annual + CUSTOM = :custom # @!method self.values # @return [Array] @@ -7086,14 +7147,14 @@ class CompositePriceFilter < Orb::Internal::Type::BaseModel # @!attribute field # The property of the price to filter on. # - # @return [Symbol, Orb::Models::Price::BulkWithProration::CompositePriceFilter::Field] - required :field, enum: -> { Orb::Price::BulkWithProration::CompositePriceFilter::Field } + # @return [Symbol, Orb::Models::Price::GroupedAllocation::CompositePriceFilter::Field] + required :field, enum: -> { Orb::Price::GroupedAllocation::CompositePriceFilter::Field } # @!attribute operator # Should prices that match the filter be included or excluded. # - # @return [Symbol, Orb::Models::Price::BulkWithProration::CompositePriceFilter::Operator] - required :operator, enum: -> { Orb::Price::BulkWithProration::CompositePriceFilter::Operator } + # @return [Symbol, Orb::Models::Price::GroupedAllocation::CompositePriceFilter::Operator] + required :operator, enum: -> { Orb::Price::GroupedAllocation::CompositePriceFilter::Operator } # @!attribute values # The IDs or values that match this filter. @@ -7102,15 +7163,15 @@ class CompositePriceFilter < Orb::Internal::Type::BaseModel required :values, Orb::Internal::Type::ArrayOf[String] # @!method initialize(field:, operator:, values:) - # @param field [Symbol, Orb::Models::Price::BulkWithProration::CompositePriceFilter::Field] The property of the price to filter on. + # @param field [Symbol, Orb::Models::Price::GroupedAllocation::CompositePriceFilter::Field] The property of the price to filter on. # - # @param operator [Symbol, Orb::Models::Price::BulkWithProration::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. + # @param operator [Symbol, Orb::Models::Price::GroupedAllocation::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. # # @param values [Array] The IDs or values that match this filter. # The property of the price to filter on. # - # @see Orb::Models::Price::BulkWithProration::CompositePriceFilter#field + # @see Orb::Models::Price::GroupedAllocation::CompositePriceFilter#field module Field extend Orb::Internal::Type::Enum @@ -7126,7 +7187,7 @@ module Field # Should prices that match the filter be included or excluded. # - # @see Orb::Models::Price::BulkWithProration::CompositePriceFilter#operator + # @see Orb::Models::Price::GroupedAllocation::CompositePriceFilter#operator module Operator extend Orb::Internal::Type::Enum @@ -7138,7 +7199,37 @@ module Operator end end - # @see Orb::Models::Price::BulkWithProration#price_type + # @see Orb::Models::Price::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 + + # @see Orb::Models::Price::GroupedAllocation#price_type module PriceType extend Orb::Internal::Type::Enum @@ -7150,7 +7241,7 @@ module PriceType # @return [Array] end - # @see Orb::Models::Price::BulkWithProration#license_type + # @see Orb::Models::Price::GroupedAllocation#license_type class LicenseType < Orb::Internal::Type::BaseModel # @!attribute id # The Orb-assigned unique identifier for the license type. @@ -7173,7 +7264,7 @@ class LicenseType < Orb::Internal::Type::BaseModel # @!method initialize(id:, grouping_key:, name:) # Some parameter documentations has been truncated, see - # {Orb::Models::Price::BulkWithProration::LicenseType} for more details. + # {Orb::Models::Price::GroupedAllocation::LicenseType} for more details. # # The LicenseType resource represents a type of license that can be assigned to # users. License types are used during billing by grouping metrics on the @@ -7187,7 +7278,7 @@ class LicenseType < Orb::Internal::Type::BaseModel end end - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel + class BulkWithProration < Orb::Internal::Type::BaseModel # @!attribute id # # @return [String] @@ -7205,21 +7296,25 @@ class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel # @!attribute billing_mode # - # @return [Symbol, Orb::Models::Price::GroupedWithProratedMinimum::BillingMode] - required :billing_mode, enum: -> { Orb::Price::GroupedWithProratedMinimum::BillingMode } + # @return [Symbol, Orb::Models::Price::BulkWithProration::BillingMode] + required :billing_mode, enum: -> { Orb::Price::BulkWithProration::BillingMode } + + # @!attribute bulk_with_proration_config + # Configuration for bulk_with_proration pricing + # + # @return [Orb::Models::Price::BulkWithProration::BulkWithProrationConfig] + required :bulk_with_proration_config, -> { Orb::Price::BulkWithProration::BulkWithProrationConfig } # @!attribute cadence # - # @return [Symbol, Orb::Models::Price::GroupedWithProratedMinimum::Cadence] - required :cadence, enum: -> { Orb::Price::GroupedWithProratedMinimum::Cadence } + # @return [Symbol, Orb::Models::Price::BulkWithProration::Cadence] + required :cadence, enum: -> { Orb::Price::BulkWithProration::Cadence } # @!attribute composite_price_filters # - # @return [Array, nil] + # @return [Array, nil] required :composite_price_filters, - -> { - Orb::Internal::Type::ArrayOf[Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter] - }, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::BulkWithProration::CompositePriceFilter] }, nil?: true # @!attribute conversion_rate @@ -7231,7 +7326,7 @@ class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel # # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] required :conversion_rate_config, - union: -> { Orb::Price::GroupedWithProratedMinimum::ConversionRateConfig }, + union: -> { Orb::Price::BulkWithProration::ConversionRateConfig }, nil?: true # @!attribute created_at @@ -7265,13 +7360,6 @@ class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel # @return [Float, nil] required :fixed_price_quantity, Float, nil?: true - # @!attribute grouped_with_prorated_minimum_config - # Configuration for grouped_with_prorated_minimum pricing - # - # @return [Orb::Models::Price::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig] - required :grouped_with_prorated_minimum_config, - -> { Orb::Price::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig } - # @!attribute invoice_grouping_key # # @return [String, nil] @@ -7325,8 +7413,8 @@ class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel # @!attribute model_type # The pricing model type # - # @return [Symbol, :grouped_with_prorated_minimum] - required :model_type, const: :grouped_with_prorated_minimum + # @return [Symbol, :bulk_with_proration] + required :model_type, const: :bulk_with_proration # @!attribute name # @@ -7340,8 +7428,8 @@ class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel # @!attribute price_type # - # @return [Symbol, Orb::Models::Price::GroupedWithProratedMinimum::PriceType] - required :price_type, enum: -> { Orb::Price::GroupedWithProratedMinimum::PriceType } + # @return [Symbol, Orb::Models::Price::BulkWithProration::PriceType] + required :price_type, enum: -> { Orb::Price::BulkWithProration::PriceType } # @!attribute replaces_price_id # The price id this price replaces. This price will take the place of the replaced @@ -7360,12 +7448,12 @@ class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel # users. License types are used during billing by grouping metrics on the # configured grouping key. # - # @return [Orb::Models::Price::GroupedWithProratedMinimum::LicenseType, nil] - optional :license_type, -> { Orb::Price::GroupedWithProratedMinimum::LicenseType }, nil?: true + # @return [Orb::Models::Price::BulkWithProration::LicenseType, nil] + optional :license_type, -> { Orb::Price::BulkWithProration::LicenseType }, nil?: true - # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, discount:, external_price_id:, fixed_price_quantity:, grouped_with_prorated_minimum_config:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, dimensional_price_configuration: nil, license_type: nil, model_type: :grouped_with_prorated_minimum) + # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, bulk_with_proration_config:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, discount:, external_price_id:, fixed_price_quantity:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, dimensional_price_configuration: nil, license_type: nil, model_type: :bulk_with_proration) # Some parameter documentations has been truncated, see - # {Orb::Models::Price::GroupedWithProratedMinimum} for more details. + # {Orb::Models::Price::BulkWithProration} for more details. # # @param id [String] # @@ -7373,11 +7461,13 @@ class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfiguration] # - # @param billing_mode [Symbol, Orb::Models::Price::GroupedWithProratedMinimum::BillingMode] + # @param billing_mode [Symbol, Orb::Models::Price::BulkWithProration::BillingMode] # - # @param cadence [Symbol, Orb::Models::Price::GroupedWithProratedMinimum::Cadence] + # @param bulk_with_proration_config [Orb::Models::Price::BulkWithProration::BulkWithProrationConfig] Configuration for bulk_with_proration pricing # - # @param composite_price_filters [Array, nil] + # @param cadence [Symbol, Orb::Models::Price::BulkWithProration::Cadence] + # + # @param composite_price_filters [Array, nil] # # @param conversion_rate [Float, nil] # @@ -7395,8 +7485,6 @@ class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel # # @param fixed_price_quantity [Float, nil] # - # @param grouped_with_prorated_minimum_config [Orb::Models::Price::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig] Configuration for grouped_with_prorated_minimum pricing - # # @param invoice_grouping_key [String, nil] # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfiguration, nil] @@ -7417,17 +7505,17 @@ class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] # - # @param price_type [Symbol, Orb::Models::Price::GroupedWithProratedMinimum::PriceType] + # @param price_type [Symbol, Orb::Models::Price::BulkWithProration::PriceType] # # @param replaces_price_id [String, nil] The price id this price replaces. This price will take the place of the replaced # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfiguration, nil] # - # @param license_type [Orb::Models::Price::GroupedWithProratedMinimum::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us + # @param license_type [Orb::Models::Price::BulkWithProration::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us # - # @param model_type [Symbol, :grouped_with_prorated_minimum] The pricing model type + # @param model_type [Symbol, :bulk_with_proration] The pricing model type - # @see Orb::Models::Price::GroupedWithProratedMinimum#billing_mode + # @see Orb::Models::Price::BulkWithProration#billing_mode module BillingMode extend Orb::Internal::Type::Enum @@ -7438,7 +7526,43 @@ module BillingMode # @return [Array] end - # @see Orb::Models::Price::GroupedWithProratedMinimum#cadence + # @see Orb::Models::Price::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::Price::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 + + # @see Orb::Models::Price::BulkWithProration#cadence module Cadence extend Orb::Internal::Type::Enum @@ -7457,14 +7581,14 @@ class CompositePriceFilter < Orb::Internal::Type::BaseModel # @!attribute field # The property of the price to filter on. # - # @return [Symbol, Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter::Field] - required :field, enum: -> { Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Field } + # @return [Symbol, Orb::Models::Price::BulkWithProration::CompositePriceFilter::Field] + required :field, enum: -> { Orb::Price::BulkWithProration::CompositePriceFilter::Field } # @!attribute operator # Should prices that match the filter be included or excluded. # - # @return [Symbol, Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter::Operator] - required :operator, enum: -> { Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Operator } + # @return [Symbol, Orb::Models::Price::BulkWithProration::CompositePriceFilter::Operator] + required :operator, enum: -> { Orb::Price::BulkWithProration::CompositePriceFilter::Operator } # @!attribute values # The IDs or values that match this filter. @@ -7473,15 +7597,15 @@ class CompositePriceFilter < Orb::Internal::Type::BaseModel required :values, Orb::Internal::Type::ArrayOf[String] # @!method initialize(field:, operator:, values:) - # @param field [Symbol, Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter::Field] The property of the price to filter on. + # @param field [Symbol, Orb::Models::Price::BulkWithProration::CompositePriceFilter::Field] The property of the price to filter on. # - # @param operator [Symbol, Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. + # @param operator [Symbol, Orb::Models::Price::BulkWithProration::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. # # @param values [Array] The IDs or values that match this filter. # The property of the price to filter on. # - # @see Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter#field + # @see Orb::Models::Price::BulkWithProration::CompositePriceFilter#field module Field extend Orb::Internal::Type::Enum @@ -7497,7 +7621,7 @@ module Field # Should prices that match the filter be included or excluded. # - # @see Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter#operator + # @see Orb::Models::Price::BulkWithProration::CompositePriceFilter#operator module Operator extend Orb::Internal::Type::Enum @@ -7509,37 +7633,7 @@ module Operator end end - # @see Orb::Models::Price::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 - - # @see Orb::Models::Price::GroupedWithProratedMinimum#price_type + # @see Orb::Models::Price::BulkWithProration#price_type module PriceType extend Orb::Internal::Type::Enum @@ -7551,7 +7645,7 @@ module PriceType # @return [Array] end - # @see Orb::Models::Price::GroupedWithProratedMinimum#license_type + # @see Orb::Models::Price::BulkWithProration#license_type class LicenseType < Orb::Internal::Type::BaseModel # @!attribute id # The Orb-assigned unique identifier for the license type. @@ -7574,7 +7668,7 @@ class LicenseType < Orb::Internal::Type::BaseModel # @!method initialize(id:, grouping_key:, name:) # Some parameter documentations has been truncated, see - # {Orb::Models::Price::GroupedWithProratedMinimum::LicenseType} for more details. + # {Orb::Models::Price::BulkWithProration::LicenseType} for more details. # # The LicenseType resource represents a type of license that can be assigned to # users. License types are used during billing by grouping metrics on the @@ -7588,7 +7682,7 @@ class LicenseType < Orb::Internal::Type::BaseModel end end - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel + class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel # @!attribute id # # @return [String] @@ -7606,20 +7700,20 @@ class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel # @!attribute billing_mode # - # @return [Symbol, Orb::Models::Price::GroupedWithMeteredMinimum::BillingMode] - required :billing_mode, enum: -> { Orb::Price::GroupedWithMeteredMinimum::BillingMode } + # @return [Symbol, Orb::Models::Price::GroupedWithProratedMinimum::BillingMode] + required :billing_mode, enum: -> { Orb::Price::GroupedWithProratedMinimum::BillingMode } # @!attribute cadence # - # @return [Symbol, Orb::Models::Price::GroupedWithMeteredMinimum::Cadence] - required :cadence, enum: -> { Orb::Price::GroupedWithMeteredMinimum::Cadence } + # @return [Symbol, Orb::Models::Price::GroupedWithProratedMinimum::Cadence] + required :cadence, enum: -> { Orb::Price::GroupedWithProratedMinimum::Cadence } # @!attribute composite_price_filters # - # @return [Array, nil] + # @return [Array, nil] required :composite_price_filters, -> { - Orb::Internal::Type::ArrayOf[Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter] + Orb::Internal::Type::ArrayOf[Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter] }, nil?: true @@ -7632,7 +7726,7 @@ class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel # # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] required :conversion_rate_config, - union: -> { Orb::Price::GroupedWithMeteredMinimum::ConversionRateConfig }, + union: -> { Orb::Price::GroupedWithProratedMinimum::ConversionRateConfig }, nil?: true # @!attribute created_at @@ -7666,12 +7760,12 @@ class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel # @return [Float, nil] required :fixed_price_quantity, Float, nil?: true - # @!attribute grouped_with_metered_minimum_config - # Configuration for grouped_with_metered_minimum pricing + # @!attribute grouped_with_prorated_minimum_config + # Configuration for grouped_with_prorated_minimum pricing # - # @return [Orb::Models::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig] - required :grouped_with_metered_minimum_config, - -> { Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig } + # @return [Orb::Models::Price::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig] + required :grouped_with_prorated_minimum_config, + -> { Orb::Price::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig } # @!attribute invoice_grouping_key # @@ -7726,8 +7820,8 @@ class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel # @!attribute model_type # The pricing model type # - # @return [Symbol, :grouped_with_metered_minimum] - required :model_type, const: :grouped_with_metered_minimum + # @return [Symbol, :grouped_with_prorated_minimum] + required :model_type, const: :grouped_with_prorated_minimum # @!attribute name # @@ -7741,8 +7835,8 @@ class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel # @!attribute price_type # - # @return [Symbol, Orb::Models::Price::GroupedWithMeteredMinimum::PriceType] - required :price_type, enum: -> { Orb::Price::GroupedWithMeteredMinimum::PriceType } + # @return [Symbol, Orb::Models::Price::GroupedWithProratedMinimum::PriceType] + required :price_type, enum: -> { Orb::Price::GroupedWithProratedMinimum::PriceType } # @!attribute replaces_price_id # The price id this price replaces. This price will take the place of the replaced @@ -7761,12 +7855,12 @@ class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel # users. License types are used during billing by grouping metrics on the # configured grouping key. # - # @return [Orb::Models::Price::GroupedWithMeteredMinimum::LicenseType, nil] - optional :license_type, -> { Orb::Price::GroupedWithMeteredMinimum::LicenseType }, nil?: true + # @return [Orb::Models::Price::GroupedWithProratedMinimum::LicenseType, nil] + optional :license_type, -> { Orb::Price::GroupedWithProratedMinimum::LicenseType }, nil?: true - # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, discount:, external_price_id:, fixed_price_quantity:, grouped_with_metered_minimum_config:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, dimensional_price_configuration: nil, license_type: nil, model_type: :grouped_with_metered_minimum) + # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, discount:, external_price_id:, fixed_price_quantity:, grouped_with_prorated_minimum_config:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, dimensional_price_configuration: nil, license_type: nil, model_type: :grouped_with_prorated_minimum) # Some parameter documentations has been truncated, see - # {Orb::Models::Price::GroupedWithMeteredMinimum} for more details. + # {Orb::Models::Price::GroupedWithProratedMinimum} for more details. # # @param id [String] # @@ -7774,11 +7868,11 @@ class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfiguration] # - # @param billing_mode [Symbol, Orb::Models::Price::GroupedWithMeteredMinimum::BillingMode] + # @param billing_mode [Symbol, Orb::Models::Price::GroupedWithProratedMinimum::BillingMode] # - # @param cadence [Symbol, Orb::Models::Price::GroupedWithMeteredMinimum::Cadence] + # @param cadence [Symbol, Orb::Models::Price::GroupedWithProratedMinimum::Cadence] # - # @param composite_price_filters [Array, nil] + # @param composite_price_filters [Array, nil] # # @param conversion_rate [Float, nil] # @@ -7796,7 +7890,7 @@ class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel # # @param fixed_price_quantity [Float, nil] # - # @param grouped_with_metered_minimum_config [Orb::Models::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig] Configuration for grouped_with_metered_minimum pricing + # @param grouped_with_prorated_minimum_config [Orb::Models::Price::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig] Configuration for grouped_with_prorated_minimum pricing # # @param invoice_grouping_key [String, nil] # @@ -7818,17 +7912,17 @@ class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] # - # @param price_type [Symbol, Orb::Models::Price::GroupedWithMeteredMinimum::PriceType] + # @param price_type [Symbol, Orb::Models::Price::GroupedWithProratedMinimum::PriceType] # # @param replaces_price_id [String, nil] The price id this price replaces. This price will take the place of the replaced # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfiguration, nil] # - # @param license_type [Orb::Models::Price::GroupedWithMeteredMinimum::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us + # @param license_type [Orb::Models::Price::GroupedWithProratedMinimum::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us # - # @param model_type [Symbol, :grouped_with_metered_minimum] The pricing model type + # @param model_type [Symbol, :grouped_with_prorated_minimum] The pricing model type - # @see Orb::Models::Price::GroupedWithMeteredMinimum#billing_mode + # @see Orb::Models::Price::GroupedWithProratedMinimum#billing_mode module BillingMode extend Orb::Internal::Type::Enum @@ -7839,7 +7933,7 @@ module BillingMode # @return [Array] end - # @see Orb::Models::Price::GroupedWithMeteredMinimum#cadence + # @see Orb::Models::Price::GroupedWithProratedMinimum#cadence module Cadence extend Orb::Internal::Type::Enum @@ -7858,14 +7952,14 @@ class CompositePriceFilter < Orb::Internal::Type::BaseModel # @!attribute field # The property of the price to filter on. # - # @return [Symbol, Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Field] - required :field, enum: -> { Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Field } + # @return [Symbol, Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter::Field] + required :field, enum: -> { Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Field } # @!attribute operator # Should prices that match the filter be included or excluded. # - # @return [Symbol, Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Operator] - required :operator, enum: -> { Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Operator } + # @return [Symbol, Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter::Operator] + required :operator, enum: -> { Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Operator } # @!attribute values # The IDs or values that match this filter. @@ -7874,15 +7968,15 @@ class CompositePriceFilter < Orb::Internal::Type::BaseModel required :values, Orb::Internal::Type::ArrayOf[String] # @!method initialize(field:, operator:, values:) - # @param field [Symbol, Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Field] The property of the price to filter on. + # @param field [Symbol, Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter::Field] The property of the price to filter on. # - # @param operator [Symbol, Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. + # @param operator [Symbol, Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. # # @param values [Array] The IDs or values that match this filter. # The property of the price to filter on. # - # @see Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter#field + # @see Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter#field module Field extend Orb::Internal::Type::Enum @@ -7898,7 +7992,7 @@ module Field # Should prices that match the filter be included or excluded. # - # @see Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter#operator + # @see Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter#operator module Operator extend Orb::Internal::Type::Enum @@ -7910,107 +8004,37 @@ module Operator end end - # @see Orb::Models::Price::GroupedWithMeteredMinimum#grouped_with_metered_minimum_config - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel + # @see Orb::Models::Price::GroupedWithProratedMinimum#grouped_with_prorated_minimum_config + class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel # @!attribute grouping_key - # Used to partition the usage into groups. The minimum amount is applied to each - # group. + # How to determine the groups that should each have a minimum # # @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 + # @!attribute minimum + # The minimum amount to charge per group # # @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::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor] } + required :minimum, String - # @!attribute scaling_key - # Used to determine the unit rate scaling factor + # @!attribute unit_rate + # The amount to charge per unit # # @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::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] } + required :unit_rate, String - # @!method initialize(grouping_key:, minimum_unit_amount:, pricing_key:, scaling_factors:, scaling_key:, unit_amounts:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Price::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 + # @!method initialize(grouping_key:, minimum:, unit_rate:) + # Configuration for grouped_with_prorated_minimum pricing # - # @param scaling_factors [Array] Scale the unit rates by the scaling factor. + # @param grouping_key [String] How to determine the groups that should each have a minimum # - # @param scaling_key [String] Used to determine the unit rate scaling factor + # @param minimum [String] The minimum amount to charge per group # - # @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 + # @param unit_rate [String] The amount to charge per unit end - # @see Orb::Models::Price::GroupedWithMeteredMinimum#price_type + # @see Orb::Models::Price::GroupedWithProratedMinimum#price_type module PriceType extend Orb::Internal::Type::Enum @@ -8022,7 +8046,7 @@ module PriceType # @return [Array] end - # @see Orb::Models::Price::GroupedWithMeteredMinimum#license_type + # @see Orb::Models::Price::GroupedWithProratedMinimum#license_type class LicenseType < Orb::Internal::Type::BaseModel # @!attribute id # The Orb-assigned unique identifier for the license type. @@ -8045,7 +8069,7 @@ class LicenseType < Orb::Internal::Type::BaseModel # @!method initialize(id:, grouping_key:, name:) # Some parameter documentations has been truncated, see - # {Orb::Models::Price::GroupedWithMeteredMinimum::LicenseType} for more details. + # {Orb::Models::Price::GroupedWithProratedMinimum::LicenseType} for more details. # # The LicenseType resource represents a type of license that can be assigned to # users. License types are used during billing by grouping metrics on the @@ -8059,7 +8083,7 @@ class LicenseType < Orb::Internal::Type::BaseModel end end - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel # @!attribute id # # @return [String] @@ -8077,20 +8101,20 @@ class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @!attribute billing_mode # - # @return [Symbol, Orb::Models::Price::GroupedWithMinMaxThresholds::BillingMode] - required :billing_mode, enum: -> { Orb::Price::GroupedWithMinMaxThresholds::BillingMode } + # @return [Symbol, Orb::Models::Price::GroupedWithMeteredMinimum::BillingMode] + required :billing_mode, enum: -> { Orb::Price::GroupedWithMeteredMinimum::BillingMode } # @!attribute cadence # - # @return [Symbol, Orb::Models::Price::GroupedWithMinMaxThresholds::Cadence] - required :cadence, enum: -> { Orb::Price::GroupedWithMinMaxThresholds::Cadence } + # @return [Symbol, Orb::Models::Price::GroupedWithMeteredMinimum::Cadence] + required :cadence, enum: -> { Orb::Price::GroupedWithMeteredMinimum::Cadence } # @!attribute composite_price_filters # - # @return [Array, nil] + # @return [Array, nil] required :composite_price_filters, -> { - Orb::Internal::Type::ArrayOf[Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter] + Orb::Internal::Type::ArrayOf[Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter] }, nil?: true @@ -8103,7 +8127,7 @@ class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] required :conversion_rate_config, - union: -> { Orb::Price::GroupedWithMinMaxThresholds::ConversionRateConfig }, + union: -> { Orb::Price::GroupedWithMeteredMinimum::ConversionRateConfig }, nil?: true # @!attribute created_at @@ -8137,12 +8161,12 @@ class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @return [Float, nil] required :fixed_price_quantity, Float, nil?: true - # @!attribute grouped_with_min_max_thresholds_config - # Configuration for grouped_with_min_max_thresholds pricing + # @!attribute grouped_with_metered_minimum_config + # Configuration for grouped_with_metered_minimum pricing # - # @return [Orb::Models::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] - required :grouped_with_min_max_thresholds_config, - -> { Orb::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } + # @return [Orb::Models::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig] + required :grouped_with_metered_minimum_config, + -> { Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig } # @!attribute invoice_grouping_key # @@ -8197,8 +8221,8 @@ class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @!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, :grouped_with_metered_minimum] + required :model_type, const: :grouped_with_metered_minimum # @!attribute name # @@ -8212,8 +8236,8 @@ class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @!attribute price_type # - # @return [Symbol, Orb::Models::Price::GroupedWithMinMaxThresholds::PriceType] - required :price_type, enum: -> { Orb::Price::GroupedWithMinMaxThresholds::PriceType } + # @return [Symbol, Orb::Models::Price::GroupedWithMeteredMinimum::PriceType] + required :price_type, enum: -> { Orb::Price::GroupedWithMeteredMinimum::PriceType } # @!attribute replaces_price_id # The price id this price replaces. This price will take the place of the replaced @@ -8232,12 +8256,12 @@ class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # users. License types are used during billing by grouping metrics on the # configured grouping key. # - # @return [Orb::Models::Price::GroupedWithMinMaxThresholds::LicenseType, nil] - optional :license_type, -> { Orb::Price::GroupedWithMinMaxThresholds::LicenseType }, nil?: true + # @return [Orb::Models::Price::GroupedWithMeteredMinimum::LicenseType, nil] + optional :license_type, -> { Orb::Price::GroupedWithMeteredMinimum::LicenseType }, nil?: true - # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, discount:, external_price_id:, fixed_price_quantity:, grouped_with_min_max_thresholds_config:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, dimensional_price_configuration: nil, license_type: nil, model_type: :grouped_with_min_max_thresholds) + # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, discount:, external_price_id:, fixed_price_quantity:, grouped_with_metered_minimum_config:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, dimensional_price_configuration: nil, license_type: nil, model_type: :grouped_with_metered_minimum) # Some parameter documentations has been truncated, see - # {Orb::Models::Price::GroupedWithMinMaxThresholds} for more details. + # {Orb::Models::Price::GroupedWithMeteredMinimum} for more details. # # @param id [String] # @@ -8245,11 +8269,11 @@ class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfiguration] # - # @param billing_mode [Symbol, Orb::Models::Price::GroupedWithMinMaxThresholds::BillingMode] + # @param billing_mode [Symbol, Orb::Models::Price::GroupedWithMeteredMinimum::BillingMode] # - # @param cadence [Symbol, Orb::Models::Price::GroupedWithMinMaxThresholds::Cadence] + # @param cadence [Symbol, Orb::Models::Price::GroupedWithMeteredMinimum::Cadence] # - # @param composite_price_filters [Array, nil] + # @param composite_price_filters [Array, nil] # # @param conversion_rate [Float, nil] # @@ -8267,7 +8291,7 @@ class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # # @param fixed_price_quantity [Float, nil] # - # @param grouped_with_min_max_thresholds_config [Orb::Models::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing + # @param grouped_with_metered_minimum_config [Orb::Models::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig] Configuration for grouped_with_metered_minimum pricing # # @param invoice_grouping_key [String, nil] # @@ -8289,17 +8313,17 @@ class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] # - # @param price_type [Symbol, Orb::Models::Price::GroupedWithMinMaxThresholds::PriceType] + # @param price_type [Symbol, Orb::Models::Price::GroupedWithMeteredMinimum::PriceType] # # @param replaces_price_id [String, nil] The price id this price replaces. This price will take the place of the replaced # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfiguration, nil] # - # @param license_type [Orb::Models::Price::GroupedWithMinMaxThresholds::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us + # @param license_type [Orb::Models::Price::GroupedWithMeteredMinimum::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us # - # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type + # @param model_type [Symbol, :grouped_with_metered_minimum] The pricing model type - # @see Orb::Models::Price::GroupedWithMinMaxThresholds#billing_mode + # @see Orb::Models::Price::GroupedWithMeteredMinimum#billing_mode module BillingMode extend Orb::Internal::Type::Enum @@ -8310,7 +8334,7 @@ module BillingMode # @return [Array] end - # @see Orb::Models::Price::GroupedWithMinMaxThresholds#cadence + # @see Orb::Models::Price::GroupedWithMeteredMinimum#cadence module Cadence extend Orb::Internal::Type::Enum @@ -8329,14 +8353,14 @@ class CompositePriceFilter < Orb::Internal::Type::BaseModel # @!attribute field # The property of the price to filter on. # - # @return [Symbol, Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Field] - required :field, enum: -> { Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Field } + # @return [Symbol, Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Field] + required :field, enum: -> { Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Field } # @!attribute operator # Should prices that match the filter be included or excluded. # - # @return [Symbol, Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Operator] - required :operator, enum: -> { Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Operator } + # @return [Symbol, Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Operator] + required :operator, enum: -> { Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Operator } # @!attribute values # The IDs or values that match this filter. @@ -8345,15 +8369,15 @@ class CompositePriceFilter < Orb::Internal::Type::BaseModel required :values, Orb::Internal::Type::ArrayOf[String] # @!method initialize(field:, operator:, values:) - # @param field [Symbol, Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Field] The property of the price to filter on. + # @param field [Symbol, Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Field] The property of the price to filter on. # - # @param operator [Symbol, Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. + # @param operator [Symbol, Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. # # @param values [Array] The IDs or values that match this filter. # The property of the price to filter on. # - # @see Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter#field + # @see Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter#field module Field extend Orb::Internal::Type::Enum @@ -8369,7 +8393,7 @@ module Field # Should prices that match the filter be included or excluded. # - # @see Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter#operator + # @see Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter#operator module Operator extend Orb::Internal::Type::Enum @@ -8381,45 +8405,107 @@ module Operator end end - # @see Orb::Models::Price::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + # @see Orb::Models::Price::GroupedWithMeteredMinimum#grouped_with_metered_minimum_config + class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel # @!attribute grouping_key - # The event property used to group before applying thresholds + # Used to partition the usage into groups. The minimum amount is applied to each + # group. # # @return [String] required :grouping_key, String - # @!attribute maximum_charge - # The maximum amount to charge each group + # @!attribute minimum_unit_amount + # The minimum amount to charge per group per unit # # @return [String] - required :maximum_charge, String + required :minimum_unit_amount, String - # @!attribute minimum_charge - # The minimum amount to charge each group, regardless of usage + # @!attribute pricing_key + # Used to determine the unit rate # # @return [String] - required :minimum_charge, String + required :pricing_key, String - # @!attribute per_unit_rate - # The base price charged per group + # @!attribute scaling_factors + # Scale the unit rates by the scaling factor. + # + # @return [Array] + required :scaling_factors, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor] } + + # @!attribute scaling_key + # Used to determine the unit rate scaling factor # # @return [String] - required :per_unit_rate, String + required :scaling_key, String - # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:) - # Configuration for grouped_with_min_max_thresholds pricing + # @!attribute unit_amounts + # Apply per unit pricing to each pricing value. The minimum amount is applied any + # unmatched usage. # - # @param grouping_key [String] The event property used to group before applying thresholds + # @return [Array] + required :unit_amounts, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::GroupedWithMeteredMinimum::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::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig} + # for more details. # - # @param maximum_charge [String] The maximum amount to charge each group + # Configuration for grouped_with_metered_minimum pricing # - # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage + # @param grouping_key [String] Used to partition the usage into groups. The minimum amount is applied to each g # - # @param per_unit_rate [String] The base price charged per group + # @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 - # @see Orb::Models::Price::GroupedWithMinMaxThresholds#price_type + # @see Orb::Models::Price::GroupedWithMeteredMinimum#price_type module PriceType extend Orb::Internal::Type::Enum @@ -8431,7 +8517,7 @@ module PriceType # @return [Array] end - # @see Orb::Models::Price::GroupedWithMinMaxThresholds#license_type + # @see Orb::Models::Price::GroupedWithMeteredMinimum#license_type class LicenseType < Orb::Internal::Type::BaseModel # @!attribute id # The Orb-assigned unique identifier for the license type. @@ -8454,7 +8540,7 @@ class LicenseType < Orb::Internal::Type::BaseModel # @!method initialize(id:, grouping_key:, name:) # Some parameter documentations has been truncated, see - # {Orb::Models::Price::GroupedWithMinMaxThresholds::LicenseType} for more details. + # {Orb::Models::Price::GroupedWithMeteredMinimum::LicenseType} for more details. # # The LicenseType resource represents a type of license that can be assigned to # users. License types are used during billing by grouping metrics on the @@ -8468,7 +8554,7 @@ class LicenseType < Orb::Internal::Type::BaseModel end end - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @!attribute id # # @return [String] @@ -8486,19 +8572,21 @@ class MatrixWithDisplayName < Orb::Internal::Type::BaseModel # @!attribute billing_mode # - # @return [Symbol, Orb::Models::Price::MatrixWithDisplayName::BillingMode] - required :billing_mode, enum: -> { Orb::Price::MatrixWithDisplayName::BillingMode } + # @return [Symbol, Orb::Models::Price::GroupedWithMinMaxThresholds::BillingMode] + required :billing_mode, enum: -> { Orb::Price::GroupedWithMinMaxThresholds::BillingMode } # @!attribute cadence # - # @return [Symbol, Orb::Models::Price::MatrixWithDisplayName::Cadence] - required :cadence, enum: -> { Orb::Price::MatrixWithDisplayName::Cadence } + # @return [Symbol, Orb::Models::Price::GroupedWithMinMaxThresholds::Cadence] + required :cadence, enum: -> { Orb::Price::GroupedWithMinMaxThresholds::Cadence } # @!attribute composite_price_filters # - # @return [Array, nil] + # @return [Array, nil] required :composite_price_filters, - -> { Orb::Internal::Type::ArrayOf[Orb::Price::MatrixWithDisplayName::CompositePriceFilter] }, + -> { + Orb::Internal::Type::ArrayOf[Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter] + }, nil?: true # @!attribute conversion_rate @@ -8510,7 +8598,7 @@ class MatrixWithDisplayName < Orb::Internal::Type::BaseModel # # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] required :conversion_rate_config, - union: -> { Orb::Price::MatrixWithDisplayName::ConversionRateConfig }, + union: -> { Orb::Price::GroupedWithMinMaxThresholds::ConversionRateConfig }, nil?: true # @!attribute created_at @@ -8544,6 +8632,13 @@ class MatrixWithDisplayName < Orb::Internal::Type::BaseModel # @return [Float, nil] required :fixed_price_quantity, Float, nil?: true + # @!attribute grouped_with_min_max_thresholds_config + # Configuration for grouped_with_min_max_thresholds pricing + # + # @return [Orb::Models::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] + required :grouped_with_min_max_thresholds_config, + -> { Orb::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } + # @!attribute invoice_grouping_key # # @return [String, nil] @@ -8561,13 +8656,6 @@ class MatrixWithDisplayName < Orb::Internal::Type::BaseModel # @return [Orb::Models::ItemSlim] required :item, -> { Orb::ItemSlim } - # @!attribute matrix_with_display_name_config - # Configuration for matrix_with_display_name pricing - # - # @return [Orb::Models::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig] - required :matrix_with_display_name_config, - -> { Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig } - # @!attribute maximum # @deprecated # @@ -8604,8 +8692,8 @@ class MatrixWithDisplayName < Orb::Internal::Type::BaseModel # @!attribute model_type # The pricing model type # - # @return [Symbol, :matrix_with_display_name] - required :model_type, const: :matrix_with_display_name + # @return [Symbol, :grouped_with_min_max_thresholds] + required :model_type, const: :grouped_with_min_max_thresholds # @!attribute name # @@ -8619,8 +8707,8 @@ class MatrixWithDisplayName < Orb::Internal::Type::BaseModel # @!attribute price_type # - # @return [Symbol, Orb::Models::Price::MatrixWithDisplayName::PriceType] - required :price_type, enum: -> { Orb::Price::MatrixWithDisplayName::PriceType } + # @return [Symbol, Orb::Models::Price::GroupedWithMinMaxThresholds::PriceType] + required :price_type, enum: -> { Orb::Price::GroupedWithMinMaxThresholds::PriceType } # @!attribute replaces_price_id # The price id this price replaces. This price will take the place of the replaced @@ -8639,12 +8727,12 @@ class MatrixWithDisplayName < Orb::Internal::Type::BaseModel # users. License types are used during billing by grouping metrics on the # configured grouping key. # - # @return [Orb::Models::Price::MatrixWithDisplayName::LicenseType, nil] - optional :license_type, -> { Orb::Price::MatrixWithDisplayName::LicenseType }, nil?: true + # @return [Orb::Models::Price::GroupedWithMinMaxThresholds::LicenseType, nil] + optional :license_type, -> { Orb::Price::GroupedWithMinMaxThresholds::LicenseType }, nil?: true - # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, discount:, external_price_id:, fixed_price_quantity:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, matrix_with_display_name_config:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, dimensional_price_configuration: nil, license_type: nil, model_type: :matrix_with_display_name) + # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, discount:, external_price_id:, fixed_price_quantity:, grouped_with_min_max_thresholds_config:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, dimensional_price_configuration: nil, license_type: nil, model_type: :grouped_with_min_max_thresholds) # Some parameter documentations has been truncated, see - # {Orb::Models::Price::MatrixWithDisplayName} for more details. + # {Orb::Models::Price::GroupedWithMinMaxThresholds} for more details. # # @param id [String] # @@ -8652,11 +8740,11 @@ class MatrixWithDisplayName < Orb::Internal::Type::BaseModel # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfiguration] # - # @param billing_mode [Symbol, Orb::Models::Price::MatrixWithDisplayName::BillingMode] + # @param billing_mode [Symbol, Orb::Models::Price::GroupedWithMinMaxThresholds::BillingMode] # - # @param cadence [Symbol, Orb::Models::Price::MatrixWithDisplayName::Cadence] + # @param cadence [Symbol, Orb::Models::Price::GroupedWithMinMaxThresholds::Cadence] # - # @param composite_price_filters [Array, nil] + # @param composite_price_filters [Array, nil] # # @param conversion_rate [Float, nil] # @@ -8674,14 +8762,14 @@ class MatrixWithDisplayName < Orb::Internal::Type::BaseModel # # @param fixed_price_quantity [Float, nil] # + # @param grouped_with_min_max_thresholds_config [Orb::Models::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing + # # @param invoice_grouping_key [String, nil] # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfiguration, nil] # # @param item [Orb::Models::ItemSlim] A minimal representation of an Item containing only the essential identifying in # - # @param matrix_with_display_name_config [Orb::Models::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig] Configuration for matrix_with_display_name pricing - # # @param maximum [Orb::Models::Maximum, nil] # # @param maximum_amount [String, nil] @@ -8696,17 +8784,17 @@ class MatrixWithDisplayName < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] # - # @param price_type [Symbol, Orb::Models::Price::MatrixWithDisplayName::PriceType] + # @param price_type [Symbol, Orb::Models::Price::GroupedWithMinMaxThresholds::PriceType] # # @param replaces_price_id [String, nil] The price id this price replaces. This price will take the place of the replaced # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfiguration, nil] # - # @param license_type [Orb::Models::Price::MatrixWithDisplayName::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us + # @param license_type [Orb::Models::Price::GroupedWithMinMaxThresholds::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us # - # @param model_type [Symbol, :matrix_with_display_name] The pricing model type + # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type - # @see Orb::Models::Price::MatrixWithDisplayName#billing_mode + # @see Orb::Models::Price::GroupedWithMinMaxThresholds#billing_mode module BillingMode extend Orb::Internal::Type::Enum @@ -8717,7 +8805,7 @@ module BillingMode # @return [Array] end - # @see Orb::Models::Price::MatrixWithDisplayName#cadence + # @see Orb::Models::Price::GroupedWithMinMaxThresholds#cadence module Cadence extend Orb::Internal::Type::Enum @@ -8736,14 +8824,14 @@ class CompositePriceFilter < Orb::Internal::Type::BaseModel # @!attribute field # The property of the price to filter on. # - # @return [Symbol, Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter::Field] - required :field, enum: -> { Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Field } + # @return [Symbol, Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Field] + required :field, enum: -> { Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Field } # @!attribute operator # Should prices that match the filter be included or excluded. # - # @return [Symbol, Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter::Operator] - required :operator, enum: -> { Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Operator } + # @return [Symbol, Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Operator] + required :operator, enum: -> { Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Operator } # @!attribute values # The IDs or values that match this filter. @@ -8752,15 +8840,15 @@ class CompositePriceFilter < Orb::Internal::Type::BaseModel required :values, Orb::Internal::Type::ArrayOf[String] # @!method initialize(field:, operator:, values:) - # @param field [Symbol, Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter::Field] The property of the price to filter on. + # @param field [Symbol, Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Field] The property of the price to filter on. # - # @param operator [Symbol, Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. + # @param operator [Symbol, Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. # # @param values [Array] The IDs or values that match this filter. # The property of the price to filter on. # - # @see Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter#field + # @see Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter#field module Field extend Orb::Internal::Type::Enum @@ -8776,7 +8864,7 @@ module Field # Should prices that match the filter be included or excluded. # - # @see Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter#operator + # @see Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter#operator module Operator extend Orb::Internal::Type::Enum @@ -8788,59 +8876,45 @@ module Operator end end - # @see Orb::Models::Price::MatrixWithDisplayName#matrix_with_display_name_config - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - # @!attribute dimension - # Used to determine the unit rate + # @see Orb::Models::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 :dimension, String + required :grouping_key, String - # @!attribute unit_amounts - # Apply per unit pricing to each dimension value + # @!attribute maximum_charge + # The maximum amount to charge each group # - # @return [Array] - required :unit_amounts, - -> { Orb::Internal::Type::ArrayOf[Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] } + # @return [String] + required :maximum_charge, String - # @!method initialize(dimension:, unit_amounts:) - # Configuration for matrix_with_display_name pricing - # - # @param dimension [String] Used to determine the unit rate + # @!attribute minimum_charge + # The minimum amount to charge each group, regardless of usage # - # @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 + # @return [String] + required :minimum_charge, String - # @!attribute unit_amount - # Per unit amount - # - # @return [String] - required :unit_amount, String + # @!attribute per_unit_rate + # The base price charged per group + # + # @return [String] + required :per_unit_rate, 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 + # @!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 - # @see Orb::Models::Price::MatrixWithDisplayName#price_type + # @see Orb::Models::Price::GroupedWithMinMaxThresholds#price_type module PriceType extend Orb::Internal::Type::Enum @@ -8852,7 +8926,7 @@ module PriceType # @return [Array] end - # @see Orb::Models::Price::MatrixWithDisplayName#license_type + # @see Orb::Models::Price::GroupedWithMinMaxThresholds#license_type class LicenseType < Orb::Internal::Type::BaseModel # @!attribute id # The Orb-assigned unique identifier for the license type. @@ -8875,7 +8949,7 @@ class LicenseType < Orb::Internal::Type::BaseModel # @!method initialize(id:, grouping_key:, name:) # Some parameter documentations has been truncated, see - # {Orb::Models::Price::MatrixWithDisplayName::LicenseType} for more details. + # {Orb::Models::Price::GroupedWithMinMaxThresholds::LicenseType} for more details. # # The LicenseType resource represents a type of license that can be assigned to # users. License types are used during billing by grouping metrics on the @@ -8889,7 +8963,7 @@ class LicenseType < Orb::Internal::Type::BaseModel end end - class GroupedTieredPackage < Orb::Internal::Type::BaseModel + class MatrixWithDisplayName < Orb::Internal::Type::BaseModel # @!attribute id # # @return [String] @@ -8907,19 +8981,19 @@ class GroupedTieredPackage < Orb::Internal::Type::BaseModel # @!attribute billing_mode # - # @return [Symbol, Orb::Models::Price::GroupedTieredPackage::BillingMode] - required :billing_mode, enum: -> { Orb::Price::GroupedTieredPackage::BillingMode } + # @return [Symbol, Orb::Models::Price::MatrixWithDisplayName::BillingMode] + required :billing_mode, enum: -> { Orb::Price::MatrixWithDisplayName::BillingMode } # @!attribute cadence # - # @return [Symbol, Orb::Models::Price::GroupedTieredPackage::Cadence] - required :cadence, enum: -> { Orb::Price::GroupedTieredPackage::Cadence } - + # @return [Symbol, Orb::Models::Price::MatrixWithDisplayName::Cadence] + required :cadence, enum: -> { Orb::Price::MatrixWithDisplayName::Cadence } + # @!attribute composite_price_filters # - # @return [Array, nil] + # @return [Array, nil] required :composite_price_filters, - -> { Orb::Internal::Type::ArrayOf[Orb::Price::GroupedTieredPackage::CompositePriceFilter] }, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::MatrixWithDisplayName::CompositePriceFilter] }, nil?: true # @!attribute conversion_rate @@ -8931,7 +9005,7 @@ class GroupedTieredPackage < Orb::Internal::Type::BaseModel # # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] required :conversion_rate_config, - union: -> { Orb::Price::GroupedTieredPackage::ConversionRateConfig }, + union: -> { Orb::Price::MatrixWithDisplayName::ConversionRateConfig }, nil?: true # @!attribute created_at @@ -8965,13 +9039,6 @@ class GroupedTieredPackage < Orb::Internal::Type::BaseModel # @return [Float, nil] required :fixed_price_quantity, Float, nil?: true - # @!attribute grouped_tiered_package_config - # Configuration for grouped_tiered_package pricing - # - # @return [Orb::Models::Price::GroupedTieredPackage::GroupedTieredPackageConfig] - required :grouped_tiered_package_config, - -> { Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig } - # @!attribute invoice_grouping_key # # @return [String, nil] @@ -8989,6 +9056,13 @@ class GroupedTieredPackage < Orb::Internal::Type::BaseModel # @return [Orb::Models::ItemSlim] required :item, -> { Orb::ItemSlim } + # @!attribute matrix_with_display_name_config + # Configuration for matrix_with_display_name pricing + # + # @return [Orb::Models::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig] + required :matrix_with_display_name_config, + -> { Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig } + # @!attribute maximum # @deprecated # @@ -9025,8 +9099,8 @@ class GroupedTieredPackage < Orb::Internal::Type::BaseModel # @!attribute model_type # The pricing model type # - # @return [Symbol, :grouped_tiered_package] - required :model_type, const: :grouped_tiered_package + # @return [Symbol, :matrix_with_display_name] + required :model_type, const: :matrix_with_display_name # @!attribute name # @@ -9040,8 +9114,8 @@ class GroupedTieredPackage < Orb::Internal::Type::BaseModel # @!attribute price_type # - # @return [Symbol, Orb::Models::Price::GroupedTieredPackage::PriceType] - required :price_type, enum: -> { Orb::Price::GroupedTieredPackage::PriceType } + # @return [Symbol, Orb::Models::Price::MatrixWithDisplayName::PriceType] + required :price_type, enum: -> { Orb::Price::MatrixWithDisplayName::PriceType } # @!attribute replaces_price_id # The price id this price replaces. This price will take the place of the replaced @@ -9060,12 +9134,12 @@ class GroupedTieredPackage < Orb::Internal::Type::BaseModel # users. License types are used during billing by grouping metrics on the # configured grouping key. # - # @return [Orb::Models::Price::GroupedTieredPackage::LicenseType, nil] - optional :license_type, -> { Orb::Price::GroupedTieredPackage::LicenseType }, nil?: true + # @return [Orb::Models::Price::MatrixWithDisplayName::LicenseType, nil] + optional :license_type, -> { Orb::Price::MatrixWithDisplayName::LicenseType }, nil?: true - # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, discount:, external_price_id:, fixed_price_quantity:, grouped_tiered_package_config:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, dimensional_price_configuration: nil, license_type: nil, model_type: :grouped_tiered_package) + # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, discount:, external_price_id:, fixed_price_quantity:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, matrix_with_display_name_config:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, dimensional_price_configuration: nil, license_type: nil, model_type: :matrix_with_display_name) # Some parameter documentations has been truncated, see - # {Orb::Models::Price::GroupedTieredPackage} for more details. + # {Orb::Models::Price::MatrixWithDisplayName} for more details. # # @param id [String] # @@ -9073,11 +9147,11 @@ class GroupedTieredPackage < Orb::Internal::Type::BaseModel # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfiguration] # - # @param billing_mode [Symbol, Orb::Models::Price::GroupedTieredPackage::BillingMode] + # @param billing_mode [Symbol, Orb::Models::Price::MatrixWithDisplayName::BillingMode] # - # @param cadence [Symbol, Orb::Models::Price::GroupedTieredPackage::Cadence] + # @param cadence [Symbol, Orb::Models::Price::MatrixWithDisplayName::Cadence] # - # @param composite_price_filters [Array, nil] + # @param composite_price_filters [Array, nil] # # @param conversion_rate [Float, nil] # @@ -9095,14 +9169,14 @@ class GroupedTieredPackage < Orb::Internal::Type::BaseModel # # @param fixed_price_quantity [Float, nil] # - # @param grouped_tiered_package_config [Orb::Models::Price::GroupedTieredPackage::GroupedTieredPackageConfig] Configuration for grouped_tiered_package pricing - # # @param invoice_grouping_key [String, nil] # # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfiguration, nil] # # @param item [Orb::Models::ItemSlim] A minimal representation of an Item containing only the essential identifying in # + # @param matrix_with_display_name_config [Orb::Models::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig] Configuration for matrix_with_display_name pricing + # # @param maximum [Orb::Models::Maximum, nil] # # @param maximum_amount [String, nil] @@ -9117,17 +9191,17 @@ class GroupedTieredPackage < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] # - # @param price_type [Symbol, Orb::Models::Price::GroupedTieredPackage::PriceType] + # @param price_type [Symbol, Orb::Models::Price::MatrixWithDisplayName::PriceType] # # @param replaces_price_id [String, nil] The price id this price replaces. This price will take the place of the replaced # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfiguration, nil] # - # @param license_type [Orb::Models::Price::GroupedTieredPackage::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us + # @param license_type [Orb::Models::Price::MatrixWithDisplayName::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us # - # @param model_type [Symbol, :grouped_tiered_package] The pricing model type + # @param model_type [Symbol, :matrix_with_display_name] The pricing model type - # @see Orb::Models::Price::GroupedTieredPackage#billing_mode + # @see Orb::Models::Price::MatrixWithDisplayName#billing_mode module BillingMode extend Orb::Internal::Type::Enum @@ -9138,7 +9212,7 @@ module BillingMode # @return [Array] end - # @see Orb::Models::Price::GroupedTieredPackage#cadence + # @see Orb::Models::Price::MatrixWithDisplayName#cadence module Cadence extend Orb::Internal::Type::Enum @@ -9157,14 +9231,14 @@ class CompositePriceFilter < Orb::Internal::Type::BaseModel # @!attribute field # The property of the price to filter on. # - # @return [Symbol, Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter::Field] - required :field, enum: -> { Orb::Price::GroupedTieredPackage::CompositePriceFilter::Field } + # @return [Symbol, Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter::Field] + required :field, enum: -> { Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Field } # @!attribute operator # Should prices that match the filter be included or excluded. # - # @return [Symbol, Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter::Operator] - required :operator, enum: -> { Orb::Price::GroupedTieredPackage::CompositePriceFilter::Operator } + # @return [Symbol, Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter::Operator] + required :operator, enum: -> { Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Operator } # @!attribute values # The IDs or values that match this filter. @@ -9173,15 +9247,15 @@ class CompositePriceFilter < Orb::Internal::Type::BaseModel required :values, Orb::Internal::Type::ArrayOf[String] # @!method initialize(field:, operator:, values:) - # @param field [Symbol, Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter::Field] The property of the price to filter on. + # @param field [Symbol, Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter::Field] The property of the price to filter on. # - # @param operator [Symbol, Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. + # @param operator [Symbol, Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. # # @param values [Array] The IDs or values that match this filter. # The property of the price to filter on. # - # @see Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter#field + # @see Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter#field module Field extend Orb::Internal::Type::Enum @@ -9197,7 +9271,7 @@ module Field # Should prices that match the filter be included or excluded. # - # @see Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter#operator + # @see Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter#operator module Operator extend Orb::Internal::Type::Enum @@ -9209,62 +9283,59 @@ module Operator end end - # @see Orb::Models::Price::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 + # @see Orb::Models::Price::MatrixWithDisplayName#matrix_with_display_name_config + class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel + # @!attribute dimension + # Used to determine the unit rate # # @return [String] - required :package_size, String + required :dimension, String - # @!attribute tiers - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. + # @!attribute unit_amounts + # Apply per unit pricing to each dimension value # - # @return [Array] - required :tiers, - -> { Orb::Internal::Type::ArrayOf[Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] } + # @return [Array] + required :unit_amounts, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] } - # @!method initialize(grouping_key:, package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Price::GroupedTieredPackage::GroupedTieredPackageConfig} for more - # details. - # - # Configuration for grouped_tiered_package pricing - # - # @param grouping_key [String] The event property used to group before tiering + # @!method initialize(dimension:, unit_amounts:) + # Configuration for matrix_with_display_name pricing # - # @param package_size [String] + # @param dimension [String] Used to determine the unit rate # - # @param tiers [Array] Apply tiered pricing after rounding up the quantity to the package size. Tiers a + # @param unit_amounts [Array] Apply per unit pricing to each dimension value - class Tier < Orb::Internal::Type::BaseModel - # @!attribute per_unit - # Per package + class UnitAmount < Orb::Internal::Type::BaseModel + # @!attribute dimension_value + # The dimension value # # @return [String] - required :per_unit, String + required :dimension_value, String - # @!attribute tier_lower_bound + # @!attribute display_name + # Display name for this dimension value # # @return [String] - required :tier_lower_bound, String + required :display_name, String - # @!method initialize(per_unit:, tier_lower_bound:) - # Configuration for a single tier + # @!attribute unit_amount + # Per unit amount # - # @param per_unit [String] Per package + # @return [String] + required :unit_amount, String + + # @!method initialize(dimension_value:, display_name:, unit_amount:) + # Configuration for a unit amount item # - # @param tier_lower_bound [String] + # @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 - # @see Orb::Models::Price::GroupedTieredPackage#price_type + # @see Orb::Models::Price::MatrixWithDisplayName#price_type module PriceType extend Orb::Internal::Type::Enum @@ -9272,11 +9343,1308 @@ module PriceType FIXED_PRICE = :fixed_price COMPOSITE_PRICE = :composite_price - # @!method self.values - # @return [Array] + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::Price::MatrixWithDisplayName#license_type + class LicenseType < Orb::Internal::Type::BaseModel + # @!attribute id + # The Orb-assigned unique identifier for the license type. + # + # @return [String] + required :id, String + + # @!attribute grouping_key + # The key used for grouping licenses of this type. This is typically a user + # identifier field. + # + # @return [String] + required :grouping_key, String + + # @!attribute name + # The name of the license type. + # + # @return [String] + required :name, String + + # @!method initialize(id:, grouping_key:, name:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::MatrixWithDisplayName::LicenseType} for more details. + # + # The LicenseType resource represents a type of license that can be assigned to + # users. License types are used during billing by grouping metrics on the + # configured grouping key. + # + # @param id [String] The Orb-assigned unique identifier for the license type. + # + # @param grouping_key [String] The key used for grouping licenses of this type. This is typically a user identi + # + # @param name [String] The name of the license type. + end + end + + class GroupedTieredPackage < Orb::Internal::Type::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute billable_metric + # + # @return [Orb::Models::BillableMetricTiny, nil] + required :billable_metric, -> { Orb::BillableMetricTiny }, nil?: true + + # @!attribute billing_cycle_configuration + # + # @return [Orb::Models::BillingCycleConfiguration] + required :billing_cycle_configuration, -> { Orb::BillingCycleConfiguration } + + # @!attribute billing_mode + # + # @return [Symbol, Orb::Models::Price::GroupedTieredPackage::BillingMode] + required :billing_mode, enum: -> { Orb::Price::GroupedTieredPackage::BillingMode } + + # @!attribute cadence + # + # @return [Symbol, Orb::Models::Price::GroupedTieredPackage::Cadence] + required :cadence, enum: -> { Orb::Price::GroupedTieredPackage::Cadence } + + # @!attribute composite_price_filters + # + # @return [Array, nil] + required :composite_price_filters, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::GroupedTieredPackage::CompositePriceFilter] }, + nil?: true + + # @!attribute conversion_rate + # + # @return [Float, nil] + required :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + required :conversion_rate_config, + union: -> { Orb::Price::GroupedTieredPackage::ConversionRateConfig }, + nil?: true + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_allocation + # + # @return [Orb::Models::Allocation, nil] + required :credit_allocation, -> { Orb::Allocation }, nil?: true + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute discount + # @deprecated + # + # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount, nil] + required :discount, union: -> { Orb::Discount }, nil?: true + + # @!attribute external_price_id + # + # @return [String, nil] + required :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # + # @return [Float, nil] + required :fixed_price_quantity, Float, nil?: true + + # @!attribute grouped_tiered_package_config + # Configuration for grouped_tiered_package pricing + # + # @return [Orb::Models::Price::GroupedTieredPackage::GroupedTieredPackageConfig] + required :grouped_tiered_package_config, + -> { Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig } + + # @!attribute invoice_grouping_key + # + # @return [String, nil] + required :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # + # @return [Orb::Models::BillingCycleConfiguration, nil] + required :invoicing_cycle_configuration, -> { Orb::BillingCycleConfiguration }, nil?: true + + # @!attribute item + # A minimal representation of an Item containing only the essential identifying + # information. + # + # @return [Orb::Models::ItemSlim] + required :item, -> { Orb::ItemSlim } + + # @!attribute maximum + # @deprecated + # + # @return [Orb::Models::Maximum, nil] + required :maximum, -> { Orb::Maximum }, nil?: true + + # @!attribute maximum_amount + # @deprecated + # + # @return [String, nil] + required :maximum_amount, String, nil?: true + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::Internal::Type::HashOf[String] + + # @!attribute minimum + # @deprecated + # + # @return [Orb::Models::Minimum, nil] + required :minimum, -> { Orb::Minimum }, nil?: true + + # @!attribute minimum_amount + # @deprecated + # + # @return [String, nil] + required :minimum_amount, String, nil?: true + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :grouped_tiered_package] + required :model_type, const: :grouped_tiered_package + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute plan_phase_order + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute price_type + # + # @return [Symbol, Orb::Models::Price::GroupedTieredPackage::PriceType] + required :price_type, enum: -> { Orb::Price::GroupedTieredPackage::PriceType } + + # @!attribute replaces_price_id + # The price id this price replaces. This price will take the place of the replaced + # price in plan version migrations. + # + # @return [String, nil] + required :replaces_price_id, String, nil?: true + + # @!attribute dimensional_price_configuration + # + # @return [Orb::Models::DimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, -> { Orb::DimensionalPriceConfiguration }, nil?: true + + # @!attribute license_type + # The LicenseType resource represents a type of license that can be assigned to + # users. License types are used during billing by grouping metrics on the + # configured grouping key. + # + # @return [Orb::Models::Price::GroupedTieredPackage::LicenseType, nil] + optional :license_type, -> { Orb::Price::GroupedTieredPackage::LicenseType }, nil?: true + + # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, discount:, external_price_id:, fixed_price_quantity:, grouped_tiered_package_config:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, dimensional_price_configuration: nil, license_type: nil, model_type: :grouped_tiered_package) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::GroupedTieredPackage} for more details. + # + # @param id [String] + # + # @param billable_metric [Orb::Models::BillableMetricTiny, nil] + # + # @param billing_cycle_configuration [Orb::Models::BillingCycleConfiguration] + # + # @param billing_mode [Symbol, Orb::Models::Price::GroupedTieredPackage::BillingMode] + # + # @param cadence [Symbol, Orb::Models::Price::GroupedTieredPackage::Cadence] + # + # @param composite_price_filters [Array, nil] + # + # @param conversion_rate [Float, nil] + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + # + # @param created_at [Time] + # + # @param credit_allocation [Orb::Models::Allocation, nil] + # + # @param currency [String] + # + # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount, nil] + # + # @param external_price_id [String, nil] + # + # @param fixed_price_quantity [Float, nil] + # + # @param grouped_tiered_package_config [Orb::Models::Price::GroupedTieredPackage::GroupedTieredPackageConfig] Configuration for grouped_tiered_package pricing + # + # @param invoice_grouping_key [String, nil] + # + # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfiguration, nil] + # + # @param item [Orb::Models::ItemSlim] A minimal representation of an Item containing only the essential identifying in + # + # @param maximum [Orb::Models::Maximum, nil] + # + # @param maximum_amount [String, nil] + # + # @param metadata [Hash{Symbol=>String}] User specified key-value pairs for the resource. If not present, this defaults t + # + # @param minimum [Orb::Models::Minimum, nil] + # + # @param minimum_amount [String, nil] + # + # @param name [String] + # + # @param plan_phase_order [Integer, nil] + # + # @param price_type [Symbol, Orb::Models::Price::GroupedTieredPackage::PriceType] + # + # @param replaces_price_id [String, nil] The price id this price replaces. This price will take the place of the replaced + # + # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfiguration, nil] + # + # @param license_type [Orb::Models::Price::GroupedTieredPackage::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us + # + # @param model_type [Symbol, :grouped_tiered_package] The pricing model type + + # @see Orb::Models::Price::GroupedTieredPackage#billing_mode + module BillingMode + extend Orb::Internal::Type::Enum + + IN_ADVANCE = :in_advance + IN_ARREAR = :in_arrear + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::Price::GroupedTieredPackage#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ONE_TIME = :one_time + MONTHLY = :monthly + QUARTERLY = :quarterly + SEMI_ANNUAL = :semi_annual + ANNUAL = :annual + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + class CompositePriceFilter < Orb::Internal::Type::BaseModel + # @!attribute field + # The property of the price to filter on. + # + # @return [Symbol, Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter::Field] + required :field, enum: -> { Orb::Price::GroupedTieredPackage::CompositePriceFilter::Field } + + # @!attribute operator + # Should prices that match the filter be included or excluded. + # + # @return [Symbol, Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter::Operator] + required :operator, enum: -> { Orb::Price::GroupedTieredPackage::CompositePriceFilter::Operator } + + # @!attribute values + # The IDs or values that match this filter. + # + # @return [Array] + required :values, Orb::Internal::Type::ArrayOf[String] + + # @!method initialize(field:, operator:, values:) + # @param field [Symbol, Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter::Field] The property of the price to filter on. + # + # @param operator [Symbol, Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. + # + # @param values [Array] The IDs or values that match this filter. + + # The property of the price to filter on. + # + # @see Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter#field + module Field + extend Orb::Internal::Type::Enum + + PRICE_ID = :price_id + ITEM_ID = :item_id + PRICE_TYPE = :price_type + CURRENCY = :currency + PRICING_UNIT_ID = :pricing_unit_id + + # @!method self.values + # @return [Array] + end + + # Should prices that match the filter be included or excluded. + # + # @see Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter#operator + module Operator + extend Orb::Internal::Type::Enum + + INCLUDES = :includes + EXCLUDES = :excludes + + # @!method self.values + # @return [Array] + end + end + + # @see Orb::Models::Price::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, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] } + + # @!method initialize(grouping_key:, package_size:, tiers:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::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 + + # @see Orb::Models::Price::GroupedTieredPackage#price_type + module PriceType + extend Orb::Internal::Type::Enum + + USAGE_PRICE = :usage_price + FIXED_PRICE = :fixed_price + COMPOSITE_PRICE = :composite_price + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::Price::GroupedTieredPackage#license_type + class LicenseType < Orb::Internal::Type::BaseModel + # @!attribute id + # The Orb-assigned unique identifier for the license type. + # + # @return [String] + required :id, String + + # @!attribute grouping_key + # The key used for grouping licenses of this type. This is typically a user + # identifier field. + # + # @return [String] + required :grouping_key, String + + # @!attribute name + # The name of the license type. + # + # @return [String] + required :name, String + + # @!method initialize(id:, grouping_key:, name:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::GroupedTieredPackage::LicenseType} for more details. + # + # The LicenseType resource represents a type of license that can be assigned to + # users. License types are used during billing by grouping metrics on the + # configured grouping key. + # + # @param id [String] The Orb-assigned unique identifier for the license type. + # + # @param grouping_key [String] The key used for grouping licenses of this type. This is typically a user identi + # + # @param name [String] The name of the license type. + end + end + + class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute billable_metric + # + # @return [Orb::Models::BillableMetricTiny, nil] + required :billable_metric, -> { Orb::BillableMetricTiny }, nil?: true + + # @!attribute billing_cycle_configuration + # + # @return [Orb::Models::BillingCycleConfiguration] + required :billing_cycle_configuration, -> { Orb::BillingCycleConfiguration } + + # @!attribute billing_mode + # + # @return [Symbol, Orb::Models::Price::MaxGroupTieredPackage::BillingMode] + required :billing_mode, enum: -> { Orb::Price::MaxGroupTieredPackage::BillingMode } + + # @!attribute cadence + # + # @return [Symbol, Orb::Models::Price::MaxGroupTieredPackage::Cadence] + required :cadence, enum: -> { Orb::Price::MaxGroupTieredPackage::Cadence } + + # @!attribute composite_price_filters + # + # @return [Array, nil] + required :composite_price_filters, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::MaxGroupTieredPackage::CompositePriceFilter] }, + nil?: true + + # @!attribute conversion_rate + # + # @return [Float, nil] + required :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + required :conversion_rate_config, + union: -> { Orb::Price::MaxGroupTieredPackage::ConversionRateConfig }, + nil?: true + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_allocation + # + # @return [Orb::Models::Allocation, nil] + required :credit_allocation, -> { Orb::Allocation }, nil?: true + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute discount + # @deprecated + # + # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount, nil] + required :discount, union: -> { Orb::Discount }, nil?: true + + # @!attribute external_price_id + # + # @return [String, nil] + required :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # + # @return [Float, nil] + required :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # + # @return [String, nil] + required :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # + # @return [Orb::Models::BillingCycleConfiguration, nil] + required :invoicing_cycle_configuration, -> { Orb::BillingCycleConfiguration }, nil?: true + + # @!attribute item + # A minimal representation of an Item containing only the essential identifying + # information. + # + # @return [Orb::Models::ItemSlim] + required :item, -> { Orb::ItemSlim } + + # @!attribute max_group_tiered_package_config + # Configuration for max_group_tiered_package pricing + # + # @return [Orb::Models::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig] + required :max_group_tiered_package_config, + -> { Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig } + + # @!attribute maximum + # @deprecated + # + # @return [Orb::Models::Maximum, nil] + required :maximum, -> { Orb::Maximum }, nil?: true + + # @!attribute maximum_amount + # @deprecated + # + # @return [String, nil] + required :maximum_amount, String, nil?: true + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::Internal::Type::HashOf[String] + + # @!attribute minimum + # @deprecated + # + # @return [Orb::Models::Minimum, nil] + required :minimum, -> { Orb::Minimum }, nil?: true + + # @!attribute minimum_amount + # @deprecated + # + # @return [String, nil] + required :minimum_amount, String, nil?: true + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :max_group_tiered_package] + required :model_type, const: :max_group_tiered_package + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute plan_phase_order + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute price_type + # + # @return [Symbol, Orb::Models::Price::MaxGroupTieredPackage::PriceType] + required :price_type, enum: -> { Orb::Price::MaxGroupTieredPackage::PriceType } + + # @!attribute replaces_price_id + # The price id this price replaces. This price will take the place of the replaced + # price in plan version migrations. + # + # @return [String, nil] + required :replaces_price_id, String, nil?: true + + # @!attribute dimensional_price_configuration + # + # @return [Orb::Models::DimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, -> { Orb::DimensionalPriceConfiguration }, nil?: true + + # @!attribute license_type + # The LicenseType resource represents a type of license that can be assigned to + # users. License types are used during billing by grouping metrics on the + # configured grouping key. + # + # @return [Orb::Models::Price::MaxGroupTieredPackage::LicenseType, nil] + optional :license_type, -> { Orb::Price::MaxGroupTieredPackage::LicenseType }, nil?: true + + # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, discount:, external_price_id:, fixed_price_quantity:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, max_group_tiered_package_config:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, dimensional_price_configuration: nil, license_type: nil, model_type: :max_group_tiered_package) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::MaxGroupTieredPackage} for more details. + # + # @param id [String] + # + # @param billable_metric [Orb::Models::BillableMetricTiny, nil] + # + # @param billing_cycle_configuration [Orb::Models::BillingCycleConfiguration] + # + # @param billing_mode [Symbol, Orb::Models::Price::MaxGroupTieredPackage::BillingMode] + # + # @param cadence [Symbol, Orb::Models::Price::MaxGroupTieredPackage::Cadence] + # + # @param composite_price_filters [Array, nil] + # + # @param conversion_rate [Float, nil] + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + # + # @param created_at [Time] + # + # @param credit_allocation [Orb::Models::Allocation, nil] + # + # @param currency [String] + # + # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount, nil] + # + # @param external_price_id [String, nil] + # + # @param fixed_price_quantity [Float, nil] + # + # @param invoice_grouping_key [String, nil] + # + # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfiguration, nil] + # + # @param item [Orb::Models::ItemSlim] A minimal representation of an Item containing only the essential identifying in + # + # @param max_group_tiered_package_config [Orb::Models::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig] Configuration for max_group_tiered_package pricing + # + # @param maximum [Orb::Models::Maximum, nil] + # + # @param maximum_amount [String, nil] + # + # @param metadata [Hash{Symbol=>String}] User specified key-value pairs for the resource. If not present, this defaults t + # + # @param minimum [Orb::Models::Minimum, nil] + # + # @param minimum_amount [String, nil] + # + # @param name [String] + # + # @param plan_phase_order [Integer, nil] + # + # @param price_type [Symbol, Orb::Models::Price::MaxGroupTieredPackage::PriceType] + # + # @param replaces_price_id [String, nil] The price id this price replaces. This price will take the place of the replaced + # + # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfiguration, nil] + # + # @param license_type [Orb::Models::Price::MaxGroupTieredPackage::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us + # + # @param model_type [Symbol, :max_group_tiered_package] The pricing model type + + # @see Orb::Models::Price::MaxGroupTieredPackage#billing_mode + module BillingMode + extend Orb::Internal::Type::Enum + + IN_ADVANCE = :in_advance + IN_ARREAR = :in_arrear + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::Price::MaxGroupTieredPackage#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ONE_TIME = :one_time + MONTHLY = :monthly + QUARTERLY = :quarterly + SEMI_ANNUAL = :semi_annual + ANNUAL = :annual + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + class CompositePriceFilter < Orb::Internal::Type::BaseModel + # @!attribute field + # The property of the price to filter on. + # + # @return [Symbol, Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter::Field] + required :field, enum: -> { Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Field } + + # @!attribute operator + # Should prices that match the filter be included or excluded. + # + # @return [Symbol, Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter::Operator] + required :operator, enum: -> { Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Operator } + + # @!attribute values + # The IDs or values that match this filter. + # + # @return [Array] + required :values, Orb::Internal::Type::ArrayOf[String] + + # @!method initialize(field:, operator:, values:) + # @param field [Symbol, Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter::Field] The property of the price to filter on. + # + # @param operator [Symbol, Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. + # + # @param values [Array] The IDs or values that match this filter. + + # The property of the price to filter on. + # + # @see Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter#field + module Field + extend Orb::Internal::Type::Enum + + PRICE_ID = :price_id + ITEM_ID = :item_id + PRICE_TYPE = :price_type + CURRENCY = :currency + PRICING_UNIT_ID = :pricing_unit_id + + # @!method self.values + # @return [Array] + end + + # Should prices that match the filter be included or excluded. + # + # @see Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter#operator + module Operator + extend Orb::Internal::Type::Enum + + INCLUDES = :includes + EXCLUDES = :excludes + + # @!method self.values + # @return [Array] + end + end + + # @see Orb::Models::Price::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, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] } + + # @!method initialize(grouping_key:, package_size:, tiers:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::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 + + # @see Orb::Models::Price::MaxGroupTieredPackage#price_type + module PriceType + extend Orb::Internal::Type::Enum + + USAGE_PRICE = :usage_price + FIXED_PRICE = :fixed_price + COMPOSITE_PRICE = :composite_price + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::Price::MaxGroupTieredPackage#license_type + class LicenseType < Orb::Internal::Type::BaseModel + # @!attribute id + # The Orb-assigned unique identifier for the license type. + # + # @return [String] + required :id, String + + # @!attribute grouping_key + # The key used for grouping licenses of this type. This is typically a user + # identifier field. + # + # @return [String] + required :grouping_key, String + + # @!attribute name + # The name of the license type. + # + # @return [String] + required :name, String + + # @!method initialize(id:, grouping_key:, name:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::MaxGroupTieredPackage::LicenseType} for more details. + # + # The LicenseType resource represents a type of license that can be assigned to + # users. License types are used during billing by grouping metrics on the + # configured grouping key. + # + # @param id [String] The Orb-assigned unique identifier for the license type. + # + # @param grouping_key [String] The key used for grouping licenses of this type. This is typically a user identi + # + # @param name [String] The name of the license type. + end + end + + class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel + # @!attribute id + # + # @return [String] + required :id, String + + # @!attribute billable_metric + # + # @return [Orb::Models::BillableMetricTiny, nil] + required :billable_metric, -> { Orb::BillableMetricTiny }, nil?: true + + # @!attribute billing_cycle_configuration + # + # @return [Orb::Models::BillingCycleConfiguration] + required :billing_cycle_configuration, -> { Orb::BillingCycleConfiguration } + + # @!attribute billing_mode + # + # @return [Symbol, Orb::Models::Price::ScalableMatrixWithUnitPricing::BillingMode] + required :billing_mode, enum: -> { Orb::Price::ScalableMatrixWithUnitPricing::BillingMode } + + # @!attribute cadence + # + # @return [Symbol, Orb::Models::Price::ScalableMatrixWithUnitPricing::Cadence] + required :cadence, enum: -> { Orb::Price::ScalableMatrixWithUnitPricing::Cadence } + + # @!attribute composite_price_filters + # + # @return [Array, nil] + required :composite_price_filters, + -> { + Orb::Internal::Type::ArrayOf[Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter] + }, + nil?: true + + # @!attribute conversion_rate + # + # @return [Float, nil] + required :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + required :conversion_rate_config, + union: -> { Orb::Price::ScalableMatrixWithUnitPricing::ConversionRateConfig }, + nil?: true + + # @!attribute created_at + # + # @return [Time] + required :created_at, Time + + # @!attribute credit_allocation + # + # @return [Orb::Models::Allocation, nil] + required :credit_allocation, -> { Orb::Allocation }, nil?: true + + # @!attribute currency + # + # @return [String] + required :currency, String + + # @!attribute discount + # @deprecated + # + # @return [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount, nil] + required :discount, union: -> { Orb::Discount }, nil?: true + + # @!attribute external_price_id + # + # @return [String, nil] + required :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # + # @return [Float, nil] + required :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # + # @return [String, nil] + required :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # + # @return [Orb::Models::BillingCycleConfiguration, nil] + required :invoicing_cycle_configuration, -> { Orb::BillingCycleConfiguration }, nil?: true + + # @!attribute item + # A minimal representation of an Item containing only the essential identifying + # information. + # + # @return [Orb::Models::ItemSlim] + required :item, -> { Orb::ItemSlim } + + # @!attribute maximum + # @deprecated + # + # @return [Orb::Models::Maximum, nil] + required :maximum, -> { Orb::Maximum }, nil?: true + + # @!attribute maximum_amount + # @deprecated + # + # @return [String, nil] + required :maximum_amount, String, nil?: true + + # @!attribute metadata + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + # + # @return [Hash{Symbol=>String}] + required :metadata, Orb::Internal::Type::HashOf[String] + + # @!attribute minimum + # @deprecated + # + # @return [Orb::Models::Minimum, nil] + required :minimum, -> { Orb::Minimum }, nil?: true + + # @!attribute minimum_amount + # @deprecated + # + # @return [String, nil] + required :minimum_amount, String, nil?: true + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :scalable_matrix_with_unit_pricing] + required :model_type, const: :scalable_matrix_with_unit_pricing + + # @!attribute name + # + # @return [String] + required :name, String + + # @!attribute plan_phase_order + # + # @return [Integer, nil] + required :plan_phase_order, Integer, nil?: true + + # @!attribute price_type + # + # @return [Symbol, Orb::Models::Price::ScalableMatrixWithUnitPricing::PriceType] + required :price_type, enum: -> { Orb::Price::ScalableMatrixWithUnitPricing::PriceType } + + # @!attribute replaces_price_id + # The price id this price replaces. This price will take the place of the replaced + # price in plan version migrations. + # + # @return [String, nil] + required :replaces_price_id, String, nil?: true + + # @!attribute scalable_matrix_with_unit_pricing_config + # Configuration for scalable_matrix_with_unit_pricing pricing + # + # @return [Orb::Models::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig] + required :scalable_matrix_with_unit_pricing_config, + -> { Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig } + + # @!attribute dimensional_price_configuration + # + # @return [Orb::Models::DimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, -> { Orb::DimensionalPriceConfiguration }, nil?: true + + # @!attribute license_type + # The LicenseType resource represents a type of license that can be assigned to + # users. License types are used during billing by grouping metrics on the + # configured grouping key. + # + # @return [Orb::Models::Price::ScalableMatrixWithUnitPricing::LicenseType, nil] + optional :license_type, -> { Orb::Price::ScalableMatrixWithUnitPricing::LicenseType }, nil?: true + + # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, discount:, external_price_id:, fixed_price_quantity:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, scalable_matrix_with_unit_pricing_config:, dimensional_price_configuration: nil, license_type: nil, model_type: :scalable_matrix_with_unit_pricing) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::ScalableMatrixWithUnitPricing} for more details. + # + # @param id [String] + # + # @param billable_metric [Orb::Models::BillableMetricTiny, nil] + # + # @param billing_cycle_configuration [Orb::Models::BillingCycleConfiguration] + # + # @param billing_mode [Symbol, Orb::Models::Price::ScalableMatrixWithUnitPricing::BillingMode] + # + # @param cadence [Symbol, Orb::Models::Price::ScalableMatrixWithUnitPricing::Cadence] + # + # @param composite_price_filters [Array, nil] + # + # @param conversion_rate [Float, nil] + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + # + # @param created_at [Time] + # + # @param credit_allocation [Orb::Models::Allocation, nil] + # + # @param currency [String] + # + # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount, nil] + # + # @param external_price_id [String, nil] + # + # @param fixed_price_quantity [Float, nil] + # + # @param invoice_grouping_key [String, nil] + # + # @param invoicing_cycle_configuration [Orb::Models::BillingCycleConfiguration, nil] + # + # @param item [Orb::Models::ItemSlim] A minimal representation of an Item containing only the essential identifying in + # + # @param maximum [Orb::Models::Maximum, nil] + # + # @param maximum_amount [String, nil] + # + # @param metadata [Hash{Symbol=>String}] User specified key-value pairs for the resource. If not present, this defaults t + # + # @param minimum [Orb::Models::Minimum, nil] + # + # @param minimum_amount [String, nil] + # + # @param name [String] + # + # @param plan_phase_order [Integer, nil] + # + # @param price_type [Symbol, Orb::Models::Price::ScalableMatrixWithUnitPricing::PriceType] + # + # @param replaces_price_id [String, nil] The price id this price replaces. This price will take the place of the replaced + # + # @param scalable_matrix_with_unit_pricing_config [Orb::Models::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig] Configuration for scalable_matrix_with_unit_pricing pricing + # + # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfiguration, nil] + # + # @param license_type [Orb::Models::Price::ScalableMatrixWithUnitPricing::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us + # + # @param model_type [Symbol, :scalable_matrix_with_unit_pricing] The pricing model type + + # @see Orb::Models::Price::ScalableMatrixWithUnitPricing#billing_mode + module BillingMode + extend Orb::Internal::Type::Enum + + IN_ADVANCE = :in_advance + IN_ARREAR = :in_arrear + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::Price::ScalableMatrixWithUnitPricing#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ONE_TIME = :one_time + MONTHLY = :monthly + QUARTERLY = :quarterly + SEMI_ANNUAL = :semi_annual + ANNUAL = :annual + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + class CompositePriceFilter < Orb::Internal::Type::BaseModel + # @!attribute field + # The property of the price to filter on. + # + # @return [Symbol, Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Field] + required :field, enum: -> { Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Field } + + # @!attribute operator + # Should prices that match the filter be included or excluded. + # + # @return [Symbol, Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Operator] + required :operator, enum: -> { Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Operator } + + # @!attribute values + # The IDs or values that match this filter. + # + # @return [Array] + required :values, Orb::Internal::Type::ArrayOf[String] + + # @!method initialize(field:, operator:, values:) + # @param field [Symbol, Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Field] The property of the price to filter on. + # + # @param operator [Symbol, Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. + # + # @param values [Array] The IDs or values that match this filter. + + # The property of the price to filter on. + # + # @see Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter#field + module Field + extend Orb::Internal::Type::Enum + + PRICE_ID = :price_id + ITEM_ID = :item_id + PRICE_TYPE = :price_type + CURRENCY = :currency + PRICING_UNIT_ID = :pricing_unit_id + + # @!method self.values + # @return [Array] + end + + # Should prices that match the filter be included or excluded. + # + # @see Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter#operator + module Operator + extend Orb::Internal::Type::Enum + + INCLUDES = :includes + EXCLUDES = :excludes + + # @!method self.values + # @return [Array] + end + end + + # @see Orb::Models::Price::ScalableMatrixWithUnitPricing#price_type + module PriceType + extend Orb::Internal::Type::Enum + + USAGE_PRICE = :usage_price + FIXED_PRICE = :fixed_price + COMPOSITE_PRICE = :composite_price + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::Price::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, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::ScalableMatrixWithUnitPricing::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 + # + # @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 - # @see Orb::Models::Price::GroupedTieredPackage#license_type + # @see Orb::Models::Price::ScalableMatrixWithUnitPricing#license_type class LicenseType < Orb::Internal::Type::BaseModel # @!attribute id # The Orb-assigned unique identifier for the license type. @@ -9299,7 +10667,8 @@ class LicenseType < Orb::Internal::Type::BaseModel # @!method initialize(id:, grouping_key:, name:) # Some parameter documentations has been truncated, see - # {Orb::Models::Price::GroupedTieredPackage::LicenseType} for more details. + # {Orb::Models::Price::ScalableMatrixWithUnitPricing::LicenseType} for more + # details. # # The LicenseType resource represents a type of license that can be assigned to # users. License types are used during billing by grouping metrics on the @@ -9313,7 +10682,7 @@ class LicenseType < Orb::Internal::Type::BaseModel end end - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel + class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel # @!attribute id # # @return [String] @@ -9331,19 +10700,21 @@ class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel # @!attribute billing_mode # - # @return [Symbol, Orb::Models::Price::MaxGroupTieredPackage::BillingMode] - required :billing_mode, enum: -> { Orb::Price::MaxGroupTieredPackage::BillingMode } + # @return [Symbol, Orb::Models::Price::ScalableMatrixWithTieredPricing::BillingMode] + required :billing_mode, enum: -> { Orb::Price::ScalableMatrixWithTieredPricing::BillingMode } # @!attribute cadence # - # @return [Symbol, Orb::Models::Price::MaxGroupTieredPackage::Cadence] - required :cadence, enum: -> { Orb::Price::MaxGroupTieredPackage::Cadence } + # @return [Symbol, Orb::Models::Price::ScalableMatrixWithTieredPricing::Cadence] + required :cadence, enum: -> { Orb::Price::ScalableMatrixWithTieredPricing::Cadence } # @!attribute composite_price_filters # - # @return [Array, nil] + # @return [Array, nil] required :composite_price_filters, - -> { Orb::Internal::Type::ArrayOf[Orb::Price::MaxGroupTieredPackage::CompositePriceFilter] }, + -> { + Orb::Internal::Type::ArrayOf[Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter] + }, nil?: true # @!attribute conversion_rate @@ -9355,7 +10726,7 @@ class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel # # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] required :conversion_rate_config, - union: -> { Orb::Price::MaxGroupTieredPackage::ConversionRateConfig }, + union: -> { Orb::Price::ScalableMatrixWithTieredPricing::ConversionRateConfig }, nil?: true # @!attribute created_at @@ -9406,13 +10777,6 @@ class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel # @return [Orb::Models::ItemSlim] required :item, -> { Orb::ItemSlim } - # @!attribute max_group_tiered_package_config - # Configuration for max_group_tiered_package pricing - # - # @return [Orb::Models::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig] - required :max_group_tiered_package_config, - -> { Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig } - # @!attribute maximum # @deprecated # @@ -9449,8 +10813,8 @@ class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel # @!attribute model_type # The pricing model type # - # @return [Symbol, :max_group_tiered_package] - required :model_type, const: :max_group_tiered_package + # @return [Symbol, :scalable_matrix_with_tiered_pricing] + required :model_type, const: :scalable_matrix_with_tiered_pricing # @!attribute name # @@ -9464,8 +10828,8 @@ class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel # @!attribute price_type # - # @return [Symbol, Orb::Models::Price::MaxGroupTieredPackage::PriceType] - required :price_type, enum: -> { Orb::Price::MaxGroupTieredPackage::PriceType } + # @return [Symbol, Orb::Models::Price::ScalableMatrixWithTieredPricing::PriceType] + required :price_type, enum: -> { Orb::Price::ScalableMatrixWithTieredPricing::PriceType } # @!attribute replaces_price_id # The price id this price replaces. This price will take the place of the replaced @@ -9474,6 +10838,13 @@ class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel # @return [String, nil] required :replaces_price_id, String, nil?: true + # @!attribute scalable_matrix_with_tiered_pricing_config + # Configuration for scalable_matrix_with_tiered_pricing pricing + # + # @return [Orb::Models::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig] + required :scalable_matrix_with_tiered_pricing_config, + -> { Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig } + # @!attribute dimensional_price_configuration # # @return [Orb::Models::DimensionalPriceConfiguration, nil] @@ -9484,12 +10855,12 @@ class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel # users. License types are used during billing by grouping metrics on the # configured grouping key. # - # @return [Orb::Models::Price::MaxGroupTieredPackage::LicenseType, nil] - optional :license_type, -> { Orb::Price::MaxGroupTieredPackage::LicenseType }, nil?: true + # @return [Orb::Models::Price::ScalableMatrixWithTieredPricing::LicenseType, nil] + optional :license_type, -> { Orb::Price::ScalableMatrixWithTieredPricing::LicenseType }, nil?: true - # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, discount:, external_price_id:, fixed_price_quantity:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, max_group_tiered_package_config:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, dimensional_price_configuration: nil, license_type: nil, model_type: :max_group_tiered_package) + # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, discount:, external_price_id:, fixed_price_quantity:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, scalable_matrix_with_tiered_pricing_config:, dimensional_price_configuration: nil, license_type: nil, model_type: :scalable_matrix_with_tiered_pricing) # Some parameter documentations has been truncated, see - # {Orb::Models::Price::MaxGroupTieredPackage} for more details. + # {Orb::Models::Price::ScalableMatrixWithTieredPricing} for more details. # # @param id [String] # @@ -9497,11 +10868,11 @@ class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfiguration] # - # @param billing_mode [Symbol, Orb::Models::Price::MaxGroupTieredPackage::BillingMode] + # @param billing_mode [Symbol, Orb::Models::Price::ScalableMatrixWithTieredPricing::BillingMode] # - # @param cadence [Symbol, Orb::Models::Price::MaxGroupTieredPackage::Cadence] + # @param cadence [Symbol, Orb::Models::Price::ScalableMatrixWithTieredPricing::Cadence] # - # @param composite_price_filters [Array, nil] + # @param composite_price_filters [Array, nil] # # @param conversion_rate [Float, nil] # @@ -9525,8 +10896,6 @@ class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel # # @param item [Orb::Models::ItemSlim] A minimal representation of an Item containing only the essential identifying in # - # @param max_group_tiered_package_config [Orb::Models::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig] Configuration for max_group_tiered_package pricing - # # @param maximum [Orb::Models::Maximum, nil] # # @param maximum_amount [String, nil] @@ -9541,17 +10910,19 @@ class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] # - # @param price_type [Symbol, Orb::Models::Price::MaxGroupTieredPackage::PriceType] + # @param price_type [Symbol, Orb::Models::Price::ScalableMatrixWithTieredPricing::PriceType] # # @param replaces_price_id [String, nil] The price id this price replaces. This price will take the place of the replaced # + # @param scalable_matrix_with_tiered_pricing_config [Orb::Models::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig] Configuration for scalable_matrix_with_tiered_pricing pricing + # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfiguration, nil] # - # @param license_type [Orb::Models::Price::MaxGroupTieredPackage::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us + # @param license_type [Orb::Models::Price::ScalableMatrixWithTieredPricing::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us # - # @param model_type [Symbol, :max_group_tiered_package] The pricing model type + # @param model_type [Symbol, :scalable_matrix_with_tiered_pricing] The pricing model type - # @see Orb::Models::Price::MaxGroupTieredPackage#billing_mode + # @see Orb::Models::Price::ScalableMatrixWithTieredPricing#billing_mode module BillingMode extend Orb::Internal::Type::Enum @@ -9562,7 +10933,7 @@ module BillingMode # @return [Array] end - # @see Orb::Models::Price::MaxGroupTieredPackage#cadence + # @see Orb::Models::Price::ScalableMatrixWithTieredPricing#cadence module Cadence extend Orb::Internal::Type::Enum @@ -9581,14 +10952,15 @@ class CompositePriceFilter < Orb::Internal::Type::BaseModel # @!attribute field # The property of the price to filter on. # - # @return [Symbol, Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter::Field] - required :field, enum: -> { Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Field } + # @return [Symbol, Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Field] + required :field, enum: -> { Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Field } # @!attribute operator # Should prices that match the filter be included or excluded. # - # @return [Symbol, Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter::Operator] - required :operator, enum: -> { Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Operator } + # @return [Symbol, Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Operator] + required :operator, + enum: -> { Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Operator } # @!attribute values # The IDs or values that match this filter. @@ -9597,15 +10969,15 @@ class CompositePriceFilter < Orb::Internal::Type::BaseModel required :values, Orb::Internal::Type::ArrayOf[String] # @!method initialize(field:, operator:, values:) - # @param field [Symbol, Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter::Field] The property of the price to filter on. + # @param field [Symbol, Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Field] The property of the price to filter on. # - # @param operator [Symbol, Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. + # @param operator [Symbol, Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. # # @param values [Array] The IDs or values that match this filter. # The property of the price to filter on. # - # @see Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter#field + # @see Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter#field module Field extend Orb::Internal::Type::Enum @@ -9621,7 +10993,7 @@ module Field # Should prices that match the filter be included or excluded. # - # @see Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter#operator + # @see Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter#operator module Operator extend Orb::Internal::Type::Enum @@ -9633,38 +11005,79 @@ module Operator end end - # @see Orb::Models::Price::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 + # @see Orb::Models::Price::ScalableMatrixWithTieredPricing#price_type + module PriceType + extend Orb::Internal::Type::Enum + + USAGE_PRICE = :usage_price + FIXED_PRICE = :fixed_price + COMPOSITE_PRICE = :composite_price + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::Price::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 :grouping_key, String + required :first_dimension, String - # @!attribute package_size + # @!attribute matrix_scaling_factors + # Apply a scaling factor to each dimension # - # @return [String] - required :package_size, String + # @return [Array] + required :matrix_scaling_factors, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor] } # @!attribute tiers - # Apply tiered pricing to the largest group after grouping with the provided key. # - # @return [Array] + # @return [Array] required :tiers, - -> { Orb::Internal::Type::ArrayOf[Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] } + -> { Orb::Internal::Type::ArrayOf[Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier] } - # @!method initialize(grouping_key:, package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig} for - # more details. + # @!attribute second_dimension + # Used for the scalable matrix second dimension (optional) # - # Configuration for max_group_tiered_package pricing + # @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 grouping_key [String] The event property used to group before tiering the group with the highest value + # @param first_dimension [String] Used for the scalable matrix first dimension # - # @param package_size [String] + # @param matrix_scaling_factors [Array] Apply a scaling factor to each dimension # - # @param tiers [Array] Apply tiered pricing to the largest group after grouping with the provided key. + # @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 @@ -9673,33 +11086,19 @@ class Tier < Orb::Internal::Type::BaseModel 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 + # Configuration for a single tier entry with business logic # # @param tier_lower_bound [String] - # - # @param unit_amount [String] Per unit amount + # @param unit_amount [String] end end - # @see Orb::Models::Price::MaxGroupTieredPackage#price_type - module PriceType - extend Orb::Internal::Type::Enum - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - COMPOSITE_PRICE = :composite_price - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Price::MaxGroupTieredPackage#license_type + # @see Orb::Models::Price::ScalableMatrixWithTieredPricing#license_type class LicenseType < Orb::Internal::Type::BaseModel # @!attribute id # The Orb-assigned unique identifier for the license type. @@ -9722,7 +11121,8 @@ class LicenseType < Orb::Internal::Type::BaseModel # @!method initialize(id:, grouping_key:, name:) # Some parameter documentations has been truncated, see - # {Orb::Models::Price::MaxGroupTieredPackage::LicenseType} for more details. + # {Orb::Models::Price::ScalableMatrixWithTieredPricing::LicenseType} for more + # details. # # The LicenseType resource represents a type of license that can be assigned to # users. License types are used during billing by grouping metrics on the @@ -9736,7 +11136,7 @@ class LicenseType < Orb::Internal::Type::BaseModel end end - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel + class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel # @!attribute id # # @return [String] @@ -9754,21 +11154,19 @@ class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel # @!attribute billing_mode # - # @return [Symbol, Orb::Models::Price::ScalableMatrixWithUnitPricing::BillingMode] - required :billing_mode, enum: -> { Orb::Price::ScalableMatrixWithUnitPricing::BillingMode } + # @return [Symbol, Orb::Models::Price::CumulativeGroupedBulk::BillingMode] + required :billing_mode, enum: -> { Orb::Price::CumulativeGroupedBulk::BillingMode } # @!attribute cadence # - # @return [Symbol, Orb::Models::Price::ScalableMatrixWithUnitPricing::Cadence] - required :cadence, enum: -> { Orb::Price::ScalableMatrixWithUnitPricing::Cadence } + # @return [Symbol, Orb::Models::Price::CumulativeGroupedBulk::Cadence] + required :cadence, enum: -> { Orb::Price::CumulativeGroupedBulk::Cadence } # @!attribute composite_price_filters # - # @return [Array, nil] + # @return [Array, nil] required :composite_price_filters, - -> { - Orb::Internal::Type::ArrayOf[Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter] - }, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::CumulativeGroupedBulk::CompositePriceFilter] }, nil?: true # @!attribute conversion_rate @@ -9780,7 +11178,7 @@ class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel # # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] required :conversion_rate_config, - union: -> { Orb::Price::ScalableMatrixWithUnitPricing::ConversionRateConfig }, + union: -> { Orb::Price::CumulativeGroupedBulk::ConversionRateConfig }, nil?: true # @!attribute created_at @@ -9793,6 +11191,13 @@ class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel # @return [Orb::Models::Allocation, nil] required :credit_allocation, -> { Orb::Allocation }, nil?: true + # @!attribute cumulative_grouped_bulk_config + # Configuration for cumulative_grouped_bulk pricing + # + # @return [Orb::Models::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig] + required :cumulative_grouped_bulk_config, + -> { Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig } + # @!attribute currency # # @return [String] @@ -9867,8 +11272,8 @@ class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel # @!attribute model_type # The pricing model type # - # @return [Symbol, :scalable_matrix_with_unit_pricing] - required :model_type, const: :scalable_matrix_with_unit_pricing + # @return [Symbol, :cumulative_grouped_bulk] + required :model_type, const: :cumulative_grouped_bulk # @!attribute name # @@ -9882,8 +11287,8 @@ class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel # @!attribute price_type # - # @return [Symbol, Orb::Models::Price::ScalableMatrixWithUnitPricing::PriceType] - required :price_type, enum: -> { Orb::Price::ScalableMatrixWithUnitPricing::PriceType } + # @return [Symbol, Orb::Models::Price::CumulativeGroupedBulk::PriceType] + required :price_type, enum: -> { Orb::Price::CumulativeGroupedBulk::PriceType } # @!attribute replaces_price_id # The price id this price replaces. This price will take the place of the replaced @@ -9892,13 +11297,6 @@ class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel # @return [String, nil] required :replaces_price_id, String, nil?: true - # @!attribute scalable_matrix_with_unit_pricing_config - # Configuration for scalable_matrix_with_unit_pricing pricing - # - # @return [Orb::Models::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig] - required :scalable_matrix_with_unit_pricing_config, - -> { Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig } - # @!attribute dimensional_price_configuration # # @return [Orb::Models::DimensionalPriceConfiguration, nil] @@ -9909,12 +11307,12 @@ class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel # users. License types are used during billing by grouping metrics on the # configured grouping key. # - # @return [Orb::Models::Price::ScalableMatrixWithUnitPricing::LicenseType, nil] - optional :license_type, -> { Orb::Price::ScalableMatrixWithUnitPricing::LicenseType }, nil?: true + # @return [Orb::Models::Price::CumulativeGroupedBulk::LicenseType, nil] + optional :license_type, -> { Orb::Price::CumulativeGroupedBulk::LicenseType }, nil?: true - # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, discount:, external_price_id:, fixed_price_quantity:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, scalable_matrix_with_unit_pricing_config:, dimensional_price_configuration: nil, license_type: nil, model_type: :scalable_matrix_with_unit_pricing) + # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, cumulative_grouped_bulk_config:, currency:, discount:, external_price_id:, fixed_price_quantity:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, dimensional_price_configuration: nil, license_type: nil, model_type: :cumulative_grouped_bulk) # Some parameter documentations has been truncated, see - # {Orb::Models::Price::ScalableMatrixWithUnitPricing} for more details. + # {Orb::Models::Price::CumulativeGroupedBulk} for more details. # # @param id [String] # @@ -9922,11 +11320,11 @@ class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfiguration] # - # @param billing_mode [Symbol, Orb::Models::Price::ScalableMatrixWithUnitPricing::BillingMode] + # @param billing_mode [Symbol, Orb::Models::Price::CumulativeGroupedBulk::BillingMode] # - # @param cadence [Symbol, Orb::Models::Price::ScalableMatrixWithUnitPricing::Cadence] + # @param cadence [Symbol, Orb::Models::Price::CumulativeGroupedBulk::Cadence] # - # @param composite_price_filters [Array, nil] + # @param composite_price_filters [Array, nil] # # @param conversion_rate [Float, nil] # @@ -9936,6 +11334,8 @@ class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel # # @param credit_allocation [Orb::Models::Allocation, nil] # + # @param cumulative_grouped_bulk_config [Orb::Models::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig] Configuration for cumulative_grouped_bulk pricing + # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount, nil] @@ -9964,19 +11364,17 @@ class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] # - # @param price_type [Symbol, Orb::Models::Price::ScalableMatrixWithUnitPricing::PriceType] + # @param price_type [Symbol, Orb::Models::Price::CumulativeGroupedBulk::PriceType] # # @param replaces_price_id [String, nil] The price id this price replaces. This price will take the place of the replaced # - # @param scalable_matrix_with_unit_pricing_config [Orb::Models::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig] Configuration for scalable_matrix_with_unit_pricing pricing - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfiguration, nil] # - # @param license_type [Orb::Models::Price::ScalableMatrixWithUnitPricing::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us + # @param license_type [Orb::Models::Price::CumulativeGroupedBulk::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us # - # @param model_type [Symbol, :scalable_matrix_with_unit_pricing] The pricing model type + # @param model_type [Symbol, :cumulative_grouped_bulk] The pricing model type - # @see Orb::Models::Price::ScalableMatrixWithUnitPricing#billing_mode + # @see Orb::Models::Price::CumulativeGroupedBulk#billing_mode module BillingMode extend Orb::Internal::Type::Enum @@ -9987,7 +11385,7 @@ module BillingMode # @return [Array] end - # @see Orb::Models::Price::ScalableMatrixWithUnitPricing#cadence + # @see Orb::Models::Price::CumulativeGroupedBulk#cadence module Cadence extend Orb::Internal::Type::Enum @@ -10006,14 +11404,14 @@ class CompositePriceFilter < Orb::Internal::Type::BaseModel # @!attribute field # The property of the price to filter on. # - # @return [Symbol, Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Field] - required :field, enum: -> { Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Field } + # @return [Symbol, Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter::Field] + required :field, enum: -> { Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Field } # @!attribute operator # Should prices that match the filter be included or excluded. # - # @return [Symbol, Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Operator] - required :operator, enum: -> { Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Operator } + # @return [Symbol, Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter::Operator] + required :operator, enum: -> { Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Operator } # @!attribute values # The IDs or values that match this filter. @@ -10022,15 +11420,15 @@ class CompositePriceFilter < Orb::Internal::Type::BaseModel required :values, Orb::Internal::Type::ArrayOf[String] # @!method initialize(field:, operator:, values:) - # @param field [Symbol, Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Field] The property of the price to filter on. + # @param field [Symbol, Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter::Field] The property of the price to filter on. # - # @param operator [Symbol, Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. + # @param operator [Symbol, Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. # # @param values [Array] The IDs or values that match this filter. # The property of the price to filter on. # - # @see Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter#field + # @see Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter#field module Field extend Orb::Internal::Type::Enum @@ -10046,7 +11444,7 @@ module Field # Should prices that match the filter be included or excluded. # - # @see Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter#operator + # @see Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter#operator module Operator extend Orb::Internal::Type::Enum @@ -10058,98 +11456,70 @@ module Operator end end - # @see Orb::Models::Price::ScalableMatrixWithUnitPricing#price_type - module PriceType - extend Orb::Internal::Type::Enum - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - COMPOSITE_PRICE = :composite_price - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Price::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 + # @see Orb::Models::Price::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 :matrix_scaling_factors, - -> { Orb::Internal::Type::ArrayOf[Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor] } + # @return [Array] + required :dimension_values, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue] } - # @!attribute unit_price - # The final unit price to rate against the output of the matrix + # @!attribute group # # @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 + required :group, String - # @!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 + # @!method initialize(dimension_values:, group:) + # Configuration for cumulative_grouped_bulk pricing # - # @param prorate [Boolean, nil] If true, the unit price will be prorated to the billing period + # @param dimension_values [Array] Each tier lower bound must have the same group of values. # - # @param second_dimension [String, nil] Used to determine the unit rate (optional) + # @param group [String] - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - # @!attribute first_dimension_value + class DimensionValue < Orb::Internal::Type::BaseModel + # @!attribute grouping_key + # Grouping key value # # @return [String] - required :first_dimension_value, String + required :grouping_key, String - # @!attribute scaling_factor + # @!attribute tier_lower_bound + # Tier lower bound # # @return [String] - required :scaling_factor, String + required :tier_lower_bound, String - # @!attribute second_dimension_value + # @!attribute unit_amount + # Unit amount for this combination # - # @return [String, nil] - optional :second_dimension_value, String, nil?: true + # @return [String] + required :unit_amount, String - # @!method initialize(first_dimension_value:, scaling_factor:, second_dimension_value: nil) - # Configuration for a single matrix scaling factor + # @!method initialize(grouping_key:, tier_lower_bound:, unit_amount:) + # Configuration for a dimension value entry # - # @param first_dimension_value [String] - # @param scaling_factor [String] - # @param second_dimension_value [String, nil] + # @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 - # @see Orb::Models::Price::ScalableMatrixWithUnitPricing#license_type + # @see Orb::Models::Price::CumulativeGroupedBulk#price_type + module PriceType + extend Orb::Internal::Type::Enum + + USAGE_PRICE = :usage_price + FIXED_PRICE = :fixed_price + COMPOSITE_PRICE = :composite_price + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::Price::CumulativeGroupedBulk#license_type class LicenseType < Orb::Internal::Type::BaseModel # @!attribute id # The Orb-assigned unique identifier for the license type. @@ -10172,8 +11542,7 @@ class LicenseType < Orb::Internal::Type::BaseModel # @!method initialize(id:, grouping_key:, name:) # Some parameter documentations has been truncated, see - # {Orb::Models::Price::ScalableMatrixWithUnitPricing::LicenseType} for more - # details. + # {Orb::Models::Price::CumulativeGroupedBulk::LicenseType} for more details. # # The LicenseType resource represents a type of license that can be assigned to # users. License types are used during billing by grouping metrics on the @@ -10187,7 +11556,7 @@ class LicenseType < Orb::Internal::Type::BaseModel end end - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # @!attribute id # # @return [String] @@ -10205,20 +11574,20 @@ class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel # @!attribute billing_mode # - # @return [Symbol, Orb::Models::Price::ScalableMatrixWithTieredPricing::BillingMode] - required :billing_mode, enum: -> { Orb::Price::ScalableMatrixWithTieredPricing::BillingMode } + # @return [Symbol, Orb::Models::Price::CumulativeGroupedAllocation::BillingMode] + required :billing_mode, enum: -> { Orb::Price::CumulativeGroupedAllocation::BillingMode } # @!attribute cadence # - # @return [Symbol, Orb::Models::Price::ScalableMatrixWithTieredPricing::Cadence] - required :cadence, enum: -> { Orb::Price::ScalableMatrixWithTieredPricing::Cadence } + # @return [Symbol, Orb::Models::Price::CumulativeGroupedAllocation::Cadence] + required :cadence, enum: -> { Orb::Price::CumulativeGroupedAllocation::Cadence } # @!attribute composite_price_filters # - # @return [Array, nil] + # @return [Array, nil] required :composite_price_filters, -> { - Orb::Internal::Type::ArrayOf[Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter] + Orb::Internal::Type::ArrayOf[Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter] }, nil?: true @@ -10231,7 +11600,7 @@ class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel # # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] required :conversion_rate_config, - union: -> { Orb::Price::ScalableMatrixWithTieredPricing::ConversionRateConfig }, + union: -> { Orb::Price::CumulativeGroupedAllocation::ConversionRateConfig }, nil?: true # @!attribute created_at @@ -10244,6 +11613,13 @@ class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel # @return [Orb::Models::Allocation, nil] required :credit_allocation, -> { Orb::Allocation }, nil?: true + # @!attribute cumulative_grouped_allocation_config + # Configuration for cumulative_grouped_allocation pricing + # + # @return [Orb::Models::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] + required :cumulative_grouped_allocation_config, + -> { Orb::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig } + # @!attribute currency # # @return [String] @@ -10318,8 +11694,8 @@ class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel # @!attribute model_type # The pricing model type # - # @return [Symbol, :scalable_matrix_with_tiered_pricing] - required :model_type, const: :scalable_matrix_with_tiered_pricing + # @return [Symbol, :cumulative_grouped_allocation] + required :model_type, const: :cumulative_grouped_allocation # @!attribute name # @@ -10333,8 +11709,8 @@ class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel # @!attribute price_type # - # @return [Symbol, Orb::Models::Price::ScalableMatrixWithTieredPricing::PriceType] - required :price_type, enum: -> { Orb::Price::ScalableMatrixWithTieredPricing::PriceType } + # @return [Symbol, Orb::Models::Price::CumulativeGroupedAllocation::PriceType] + required :price_type, enum: -> { Orb::Price::CumulativeGroupedAllocation::PriceType } # @!attribute replaces_price_id # The price id this price replaces. This price will take the place of the replaced @@ -10343,13 +11719,6 @@ class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel # @return [String, nil] required :replaces_price_id, String, nil?: true - # @!attribute scalable_matrix_with_tiered_pricing_config - # Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @return [Orb::Models::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig] - required :scalable_matrix_with_tiered_pricing_config, - -> { Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig } - # @!attribute dimensional_price_configuration # # @return [Orb::Models::DimensionalPriceConfiguration, nil] @@ -10360,12 +11729,12 @@ class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel # users. License types are used during billing by grouping metrics on the # configured grouping key. # - # @return [Orb::Models::Price::ScalableMatrixWithTieredPricing::LicenseType, nil] - optional :license_type, -> { Orb::Price::ScalableMatrixWithTieredPricing::LicenseType }, nil?: true + # @return [Orb::Models::Price::CumulativeGroupedAllocation::LicenseType, nil] + optional :license_type, -> { Orb::Price::CumulativeGroupedAllocation::LicenseType }, nil?: true - # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, discount:, external_price_id:, fixed_price_quantity:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, scalable_matrix_with_tiered_pricing_config:, dimensional_price_configuration: nil, license_type: nil, model_type: :scalable_matrix_with_tiered_pricing) + # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, cumulative_grouped_allocation_config:, currency:, discount:, external_price_id:, fixed_price_quantity:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, dimensional_price_configuration: nil, license_type: nil, model_type: :cumulative_grouped_allocation) # Some parameter documentations has been truncated, see - # {Orb::Models::Price::ScalableMatrixWithTieredPricing} for more details. + # {Orb::Models::Price::CumulativeGroupedAllocation} for more details. # # @param id [String] # @@ -10373,11 +11742,11 @@ class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfiguration] # - # @param billing_mode [Symbol, Orb::Models::Price::ScalableMatrixWithTieredPricing::BillingMode] + # @param billing_mode [Symbol, Orb::Models::Price::CumulativeGroupedAllocation::BillingMode] # - # @param cadence [Symbol, Orb::Models::Price::ScalableMatrixWithTieredPricing::Cadence] + # @param cadence [Symbol, Orb::Models::Price::CumulativeGroupedAllocation::Cadence] # - # @param composite_price_filters [Array, nil] + # @param composite_price_filters [Array, nil] # # @param conversion_rate [Float, nil] # @@ -10387,6 +11756,8 @@ class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel # # @param credit_allocation [Orb::Models::Allocation, nil] # + # @param cumulative_grouped_allocation_config [Orb::Models::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing + # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount, nil] @@ -10415,19 +11786,17 @@ class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] # - # @param price_type [Symbol, Orb::Models::Price::ScalableMatrixWithTieredPricing::PriceType] + # @param price_type [Symbol, Orb::Models::Price::CumulativeGroupedAllocation::PriceType] # # @param replaces_price_id [String, nil] The price id this price replaces. This price will take the place of the replaced # - # @param scalable_matrix_with_tiered_pricing_config [Orb::Models::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig] Configuration for scalable_matrix_with_tiered_pricing pricing - # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfiguration, nil] # - # @param license_type [Orb::Models::Price::ScalableMatrixWithTieredPricing::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us + # @param license_type [Orb::Models::Price::CumulativeGroupedAllocation::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us # - # @param model_type [Symbol, :scalable_matrix_with_tiered_pricing] The pricing model type + # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type - # @see Orb::Models::Price::ScalableMatrixWithTieredPricing#billing_mode + # @see Orb::Models::Price::CumulativeGroupedAllocation#billing_mode module BillingMode extend Orb::Internal::Type::Enum @@ -10438,7 +11807,7 @@ module BillingMode # @return [Array] end - # @see Orb::Models::Price::ScalableMatrixWithTieredPricing#cadence + # @see Orb::Models::Price::CumulativeGroupedAllocation#cadence module Cadence extend Orb::Internal::Type::Enum @@ -10457,15 +11826,14 @@ class CompositePriceFilter < Orb::Internal::Type::BaseModel # @!attribute field # The property of the price to filter on. # - # @return [Symbol, Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Field] - required :field, enum: -> { Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Field } + # @return [Symbol, Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter::Field] + required :field, enum: -> { Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Field } # @!attribute operator # Should prices that match the filter be included or excluded. # - # @return [Symbol, Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Operator] - required :operator, - enum: -> { Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Operator } + # @return [Symbol, Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter::Operator] + required :operator, enum: -> { Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Operator } # @!attribute values # The IDs or values that match this filter. @@ -10474,15 +11842,15 @@ class CompositePriceFilter < Orb::Internal::Type::BaseModel required :values, Orb::Internal::Type::ArrayOf[String] # @!method initialize(field:, operator:, values:) - # @param field [Symbol, Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Field] The property of the price to filter on. + # @param field [Symbol, Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter::Field] The property of the price to filter on. # - # @param operator [Symbol, Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. + # @param operator [Symbol, Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. # # @param values [Array] The IDs or values that match this filter. # The property of the price to filter on. # - # @see Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter#field + # @see Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter#field module Field extend Orb::Internal::Type::Enum @@ -10498,7 +11866,7 @@ module Field # Should prices that match the filter be included or excluded. # - # @see Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter#operator + # @see Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter#operator module Operator extend Orb::Internal::Type::Enum @@ -10510,100 +11878,57 @@ module Operator end end - # @see Orb::Models::Price::ScalableMatrixWithTieredPricing#price_type - module PriceType - extend Orb::Internal::Type::Enum - - USAGE_PRICE = :usage_price - FIXED_PRICE = :fixed_price - COMPOSITE_PRICE = :composite_price - - # @!method self.values - # @return [Array] - end - - # @see Orb::Models::Price::ScalableMatrixWithTieredPricing#scalable_matrix_with_tiered_pricing_config - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - # @!attribute first_dimension - # Used for the scalable matrix first dimension + # @see Orb::Models::Price::CumulativeGroupedAllocation#cumulative_grouped_allocation_config + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + # @!attribute cumulative_allocation + # The overall allocation across all groups # # @return [String] - required :first_dimension, String + required :cumulative_allocation, String - # @!attribute matrix_scaling_factors - # Apply a scaling factor to each dimension + # @!attribute group_allocation + # The allocation per individual group # - # @return [Array] - required :matrix_scaling_factors, - -> { Orb::Internal::Type::ArrayOf[Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor] } + # @return [String] + required :group_allocation, String - # @!attribute tiers + # @!attribute grouping_key + # The event property used to group usage before applying allocations # - # @return [Array] - required :tiers, - -> { Orb::Internal::Type::ArrayOf[Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier] } + # @return [String] + required :grouping_key, String - # @!attribute second_dimension - # Used for the scalable matrix second dimension (optional) + # @!attribute unit_amount + # The amount to charge for each unit outside of the allocation # - # @return [String, nil] - optional :second_dimension, String, nil?: true + # @return [String] + required :unit_amount, String - # @!method initialize(first_dimension:, matrix_scaling_factors:, tiers:, second_dimension: nil) - # Configuration for scalable_matrix_with_tiered_pricing pricing + # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:) + # Configuration for cumulative_grouped_allocation pricing # - # @param first_dimension [String] Used for the scalable matrix first dimension + # @param cumulative_allocation [String] The overall allocation across all groups # - # @param matrix_scaling_factors [Array] Apply a scaling factor to each dimension + # @param group_allocation [String] The allocation per individual group # - # @param tiers [Array] + # @param grouping_key [String] The event property used to group usage before applying allocations # - # @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 + # @param unit_amount [String] The amount to charge for each unit outside of the allocation + end - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # - # @return [String] - required :tier_lower_bound, String + # @see Orb::Models::Price::CumulativeGroupedAllocation#price_type + module PriceType + extend Orb::Internal::Type::Enum - # @!attribute unit_amount - # - # @return [String] - required :unit_amount, String + USAGE_PRICE = :usage_price + FIXED_PRICE = :fixed_price + COMPOSITE_PRICE = :composite_price - # @!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 + # @!method self.values + # @return [Array] end - # @see Orb::Models::Price::ScalableMatrixWithTieredPricing#license_type + # @see Orb::Models::Price::CumulativeGroupedAllocation#license_type class LicenseType < Orb::Internal::Type::BaseModel # @!attribute id # The Orb-assigned unique identifier for the license type. @@ -10626,8 +11951,7 @@ class LicenseType < Orb::Internal::Type::BaseModel # @!method initialize(id:, grouping_key:, name:) # Some parameter documentations has been truncated, see - # {Orb::Models::Price::ScalableMatrixWithTieredPricing::LicenseType} for more - # details. + # {Orb::Models::Price::CumulativeGroupedAllocation::LicenseType} for more details. # # The LicenseType resource represents a type of license that can be assigned to # users. License types are used during billing by grouping metrics on the @@ -10641,7 +11965,7 @@ class LicenseType < Orb::Internal::Type::BaseModel end end - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel # @!attribute id # # @return [String] @@ -10659,19 +11983,19 @@ class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel # @!attribute billing_mode # - # @return [Symbol, Orb::Models::Price::CumulativeGroupedBulk::BillingMode] - required :billing_mode, enum: -> { Orb::Price::CumulativeGroupedBulk::BillingMode } + # @return [Symbol, Orb::Models::Price::DailyCreditAllowance::BillingMode] + required :billing_mode, enum: -> { Orb::Price::DailyCreditAllowance::BillingMode } # @!attribute cadence # - # @return [Symbol, Orb::Models::Price::CumulativeGroupedBulk::Cadence] - required :cadence, enum: -> { Orb::Price::CumulativeGroupedBulk::Cadence } + # @return [Symbol, Orb::Models::Price::DailyCreditAllowance::Cadence] + required :cadence, enum: -> { Orb::Price::DailyCreditAllowance::Cadence } # @!attribute composite_price_filters # - # @return [Array, nil] + # @return [Array, nil] required :composite_price_filters, - -> { Orb::Internal::Type::ArrayOf[Orb::Price::CumulativeGroupedBulk::CompositePriceFilter] }, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::DailyCreditAllowance::CompositePriceFilter] }, nil?: true # @!attribute conversion_rate @@ -10683,7 +12007,7 @@ class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel # # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] required :conversion_rate_config, - union: -> { Orb::Price::CumulativeGroupedBulk::ConversionRateConfig }, + union: -> { Orb::Price::DailyCreditAllowance::ConversionRateConfig }, nil?: true # @!attribute created_at @@ -10696,18 +12020,18 @@ class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel # @return [Orb::Models::Allocation, nil] required :credit_allocation, -> { Orb::Allocation }, nil?: true - # @!attribute cumulative_grouped_bulk_config - # Configuration for cumulative_grouped_bulk pricing - # - # @return [Orb::Models::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig] - required :cumulative_grouped_bulk_config, - -> { Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig } - # @!attribute currency # # @return [String] required :currency, String + # @!attribute daily_credit_allowance_config + # Configuration for daily_credit_allowance pricing + # + # @return [Orb::Models::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] + required :daily_credit_allowance_config, + -> { Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig } + # @!attribute discount # @deprecated # @@ -10777,8 +12101,8 @@ class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel # @!attribute model_type # The pricing model type # - # @return [Symbol, :cumulative_grouped_bulk] - required :model_type, const: :cumulative_grouped_bulk + # @return [Symbol, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance # @!attribute name # @@ -10792,8 +12116,8 @@ class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel # @!attribute price_type # - # @return [Symbol, Orb::Models::Price::CumulativeGroupedBulk::PriceType] - required :price_type, enum: -> { Orb::Price::CumulativeGroupedBulk::PriceType } + # @return [Symbol, Orb::Models::Price::DailyCreditAllowance::PriceType] + required :price_type, enum: -> { Orb::Price::DailyCreditAllowance::PriceType } # @!attribute replaces_price_id # The price id this price replaces. This price will take the place of the replaced @@ -10812,12 +12136,12 @@ class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel # users. License types are used during billing by grouping metrics on the # configured grouping key. # - # @return [Orb::Models::Price::CumulativeGroupedBulk::LicenseType, nil] - optional :license_type, -> { Orb::Price::CumulativeGroupedBulk::LicenseType }, nil?: true + # @return [Orb::Models::Price::DailyCreditAllowance::LicenseType, nil] + optional :license_type, -> { Orb::Price::DailyCreditAllowance::LicenseType }, nil?: true - # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, cumulative_grouped_bulk_config:, currency:, discount:, external_price_id:, fixed_price_quantity:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, dimensional_price_configuration: nil, license_type: nil, model_type: :cumulative_grouped_bulk) + # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, daily_credit_allowance_config:, discount:, external_price_id:, fixed_price_quantity:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, dimensional_price_configuration: nil, license_type: nil, model_type: :daily_credit_allowance) # Some parameter documentations has been truncated, see - # {Orb::Models::Price::CumulativeGroupedBulk} for more details. + # {Orb::Models::Price::DailyCreditAllowance} for more details. # # @param id [String] # @@ -10825,11 +12149,11 @@ class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfiguration] # - # @param billing_mode [Symbol, Orb::Models::Price::CumulativeGroupedBulk::BillingMode] + # @param billing_mode [Symbol, Orb::Models::Price::DailyCreditAllowance::BillingMode] # - # @param cadence [Symbol, Orb::Models::Price::CumulativeGroupedBulk::Cadence] + # @param cadence [Symbol, Orb::Models::Price::DailyCreditAllowance::Cadence] # - # @param composite_price_filters [Array, nil] + # @param composite_price_filters [Array, nil] # # @param conversion_rate [Float, nil] # @@ -10839,10 +12163,10 @@ class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel # # @param credit_allocation [Orb::Models::Allocation, nil] # - # @param cumulative_grouped_bulk_config [Orb::Models::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig] Configuration for cumulative_grouped_bulk pricing - # # @param currency [String] # + # @param daily_credit_allowance_config [Orb::Models::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing + # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount, nil] # # @param external_price_id [String, nil] @@ -10869,17 +12193,17 @@ class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] # - # @param price_type [Symbol, Orb::Models::Price::CumulativeGroupedBulk::PriceType] + # @param price_type [Symbol, Orb::Models::Price::DailyCreditAllowance::PriceType] # # @param replaces_price_id [String, nil] The price id this price replaces. This price will take the place of the replaced # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfiguration, nil] # - # @param license_type [Orb::Models::Price::CumulativeGroupedBulk::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us + # @param license_type [Orb::Models::Price::DailyCreditAllowance::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us # - # @param model_type [Symbol, :cumulative_grouped_bulk] The pricing model type + # @param model_type [Symbol, :daily_credit_allowance] The pricing model type - # @see Orb::Models::Price::CumulativeGroupedBulk#billing_mode + # @see Orb::Models::Price::DailyCreditAllowance#billing_mode module BillingMode extend Orb::Internal::Type::Enum @@ -10890,7 +12214,7 @@ module BillingMode # @return [Array] end - # @see Orb::Models::Price::CumulativeGroupedBulk#cadence + # @see Orb::Models::Price::DailyCreditAllowance#cadence module Cadence extend Orb::Internal::Type::Enum @@ -10909,14 +12233,14 @@ class CompositePriceFilter < Orb::Internal::Type::BaseModel # @!attribute field # The property of the price to filter on. # - # @return [Symbol, Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter::Field] - required :field, enum: -> { Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Field } + # @return [Symbol, Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::Field] + required :field, enum: -> { Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field } # @!attribute operator # Should prices that match the filter be included or excluded. # - # @return [Symbol, Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter::Operator] - required :operator, enum: -> { Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Operator } + # @return [Symbol, Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::Operator] + required :operator, enum: -> { Orb::Price::DailyCreditAllowance::CompositePriceFilter::Operator } # @!attribute values # The IDs or values that match this filter. @@ -10925,15 +12249,15 @@ class CompositePriceFilter < Orb::Internal::Type::BaseModel required :values, Orb::Internal::Type::ArrayOf[String] # @!method initialize(field:, operator:, values:) - # @param field [Symbol, Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter::Field] The property of the price to filter on. + # @param field [Symbol, Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::Field] The property of the price to filter on. # - # @param operator [Symbol, Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. + # @param operator [Symbol, Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. # # @param values [Array] The IDs or values that match this filter. # The property of the price to filter on. # - # @see Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter#field + # @see Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter#field module Field extend Orb::Internal::Type::Enum @@ -10949,7 +12273,7 @@ module Field # Should prices that match the filter be included or excluded. # - # @see Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter#operator + # @see Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter#operator module Operator extend Orb::Internal::Type::Enum @@ -10961,58 +12285,88 @@ module Operator end end - # @see Orb::Models::Price::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. + # @see Orb::Models::Price::DailyCreditAllowance#daily_credit_allowance_config + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute daily_allowance + # Credits granted per day. Lose-it-or-use-it; does not roll over. # - # @return [Array] - required :dimension_values, - -> { Orb::Internal::Type::ArrayOf[Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue] } + # @return [String] + required :daily_allowance, String - # @!attribute group + # @!attribute default_unit_amount + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value # # @return [String] - required :group, String + required :default_unit_amount, String - # @!method initialize(dimension_values:, group:) - # Configuration for cumulative_grouped_bulk pricing + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by # - # @param dimension_values [Array] Each tier lower bound must have the same group of values. + # @return [Array] + required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute event_day_property + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. # - # @param group [String] + # @return [String] + required :event_day_property, String - class DimensionValue < Orb::Internal::Type::BaseModel - # @!attribute grouping_key - # Grouping key value - # - # @return [String] - required :grouping_key, String + # @!attribute matrix_values + # Per-dimension credit rates + # + # @return [Array] + required :matrix_values, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] } - # @!attribute tier_lower_bound - # Tier lower bound + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::DailyCreditAllowance::DailyCreditAllowanceConfig} for more + # details. + # + # Configuration for daily_credit_allowance pricing + # + # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified + # matrix\_ + # + # @param dimensions [Array] One or two event property values to evaluate matrix groups by + # + # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g. + # + # @param matrix_values [Array] Per-dimension credit rates + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. # - # @return [String] - required :tier_lower_bound, String + # @return [Array] + required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true] # @!attribute unit_amount - # Unit amount for this combination + # Credits charged per unit of usage matching the specified dimension_values # # @return [String] required :unit_amount, String - # @!method initialize(grouping_key:, tier_lower_bound:, unit_amount:) - # Configuration for a dimension value entry + # @!method initialize(dimension_values:, unit_amount:) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue} + # for more details. # - # @param grouping_key [String] Grouping key value + # Per-dimension credit price for the daily credit allowance model. # - # @param tier_lower_bound [String] Tier lower bound + # @param dimension_values [Array] One or two matrix keys to filter usage to this value by. For example, ["model"] # - # @param unit_amount [String] Unit amount for this combination + # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values end end - # @see Orb::Models::Price::CumulativeGroupedBulk#price_type + # @see Orb::Models::Price::DailyCreditAllowance#price_type module PriceType extend Orb::Internal::Type::Enum @@ -11024,7 +12378,7 @@ module PriceType # @return [Array] end - # @see Orb::Models::Price::CumulativeGroupedBulk#license_type + # @see Orb::Models::Price::DailyCreditAllowance#license_type class LicenseType < Orb::Internal::Type::BaseModel # @!attribute id # The Orb-assigned unique identifier for the license type. @@ -11047,7 +12401,7 @@ class LicenseType < Orb::Internal::Type::BaseModel # @!method initialize(id:, grouping_key:, name:) # Some parameter documentations has been truncated, see - # {Orb::Models::Price::CumulativeGroupedBulk::LicenseType} for more details. + # {Orb::Models::Price::DailyCreditAllowance::LicenseType} for more details. # # The LicenseType resource represents a type of license that can be assigned to # users. License types are used during billing by grouping metrics on the @@ -11061,7 +12415,7 @@ class LicenseType < Orb::Internal::Type::BaseModel end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel # @!attribute id # # @return [String] @@ -11079,21 +12433,19 @@ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # @!attribute billing_mode # - # @return [Symbol, Orb::Models::Price::CumulativeGroupedAllocation::BillingMode] - required :billing_mode, enum: -> { Orb::Price::CumulativeGroupedAllocation::BillingMode } + # @return [Symbol, Orb::Models::Price::MeteredAllowance::BillingMode] + required :billing_mode, enum: -> { Orb::Price::MeteredAllowance::BillingMode } # @!attribute cadence # - # @return [Symbol, Orb::Models::Price::CumulativeGroupedAllocation::Cadence] - required :cadence, enum: -> { Orb::Price::CumulativeGroupedAllocation::Cadence } + # @return [Symbol, Orb::Models::Price::MeteredAllowance::Cadence] + required :cadence, enum: -> { Orb::Price::MeteredAllowance::Cadence } # @!attribute composite_price_filters # - # @return [Array, nil] + # @return [Array, nil] required :composite_price_filters, - -> { - Orb::Internal::Type::ArrayOf[Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter] - }, + -> { Orb::Internal::Type::ArrayOf[Orb::Price::MeteredAllowance::CompositePriceFilter] }, nil?: true # @!attribute conversion_rate @@ -11105,7 +12457,7 @@ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] required :conversion_rate_config, - union: -> { Orb::Price::CumulativeGroupedAllocation::ConversionRateConfig }, + union: -> { Orb::Price::MeteredAllowance::ConversionRateConfig }, nil?: true # @!attribute created_at @@ -11118,13 +12470,6 @@ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # @return [Orb::Models::Allocation, nil] required :credit_allocation, -> { Orb::Allocation }, nil?: true - # @!attribute cumulative_grouped_allocation_config - # Configuration for cumulative_grouped_allocation pricing - # - # @return [Orb::Models::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] - required :cumulative_grouped_allocation_config, - -> { Orb::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig } - # @!attribute currency # # @return [String] @@ -11184,6 +12529,12 @@ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # @return [Hash{Symbol=>String}] required :metadata, Orb::Internal::Type::HashOf[String] + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing + # + # @return [Orb::Models::Price::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, -> { Orb::Price::MeteredAllowance::MeteredAllowanceConfig } + # @!attribute minimum # @deprecated # @@ -11199,8 +12550,8 @@ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # @!attribute model_type # The pricing model type # - # @return [Symbol, :cumulative_grouped_allocation] - required :model_type, const: :cumulative_grouped_allocation + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance # @!attribute name # @@ -11214,8 +12565,8 @@ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # @!attribute price_type # - # @return [Symbol, Orb::Models::Price::CumulativeGroupedAllocation::PriceType] - required :price_type, enum: -> { Orb::Price::CumulativeGroupedAllocation::PriceType } + # @return [Symbol, Orb::Models::Price::MeteredAllowance::PriceType] + required :price_type, enum: -> { Orb::Price::MeteredAllowance::PriceType } # @!attribute replaces_price_id # The price id this price replaces. This price will take the place of the replaced @@ -11234,12 +12585,12 @@ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # users. License types are used during billing by grouping metrics on the # configured grouping key. # - # @return [Orb::Models::Price::CumulativeGroupedAllocation::LicenseType, nil] - optional :license_type, -> { Orb::Price::CumulativeGroupedAllocation::LicenseType }, nil?: true + # @return [Orb::Models::Price::MeteredAllowance::LicenseType, nil] + optional :license_type, -> { Orb::Price::MeteredAllowance::LicenseType }, nil?: true - # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, cumulative_grouped_allocation_config:, currency:, discount:, external_price_id:, fixed_price_quantity:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, dimensional_price_configuration: nil, license_type: nil, model_type: :cumulative_grouped_allocation) + # @!method initialize(id:, billable_metric:, billing_cycle_configuration:, billing_mode:, cadence:, composite_price_filters:, conversion_rate:, conversion_rate_config:, created_at:, credit_allocation:, currency:, discount:, external_price_id:, fixed_price_quantity:, invoice_grouping_key:, invoicing_cycle_configuration:, item:, maximum:, maximum_amount:, metadata:, metered_allowance_config:, minimum:, minimum_amount:, name:, plan_phase_order:, price_type:, replaces_price_id:, dimensional_price_configuration: nil, license_type: nil, model_type: :metered_allowance) # Some parameter documentations has been truncated, see - # {Orb::Models::Price::CumulativeGroupedAllocation} for more details. + # {Orb::Models::Price::MeteredAllowance} for more details. # # @param id [String] # @@ -11247,11 +12598,11 @@ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # # @param billing_cycle_configuration [Orb::Models::BillingCycleConfiguration] # - # @param billing_mode [Symbol, Orb::Models::Price::CumulativeGroupedAllocation::BillingMode] + # @param billing_mode [Symbol, Orb::Models::Price::MeteredAllowance::BillingMode] # - # @param cadence [Symbol, Orb::Models::Price::CumulativeGroupedAllocation::Cadence] + # @param cadence [Symbol, Orb::Models::Price::MeteredAllowance::Cadence] # - # @param composite_price_filters [Array, nil] + # @param composite_price_filters [Array, nil] # # @param conversion_rate [Float, nil] # @@ -11261,8 +12612,6 @@ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # # @param credit_allocation [Orb::Models::Allocation, nil] # - # @param cumulative_grouped_allocation_config [Orb::Models::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing - # # @param currency [String] # # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount, nil] @@ -11283,6 +12632,8 @@ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # # @param metadata [Hash{Symbol=>String}] User specified key-value pairs for the resource. If not present, this defaults t # + # @param metered_allowance_config [Orb::Models::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing + # # @param minimum [Orb::Models::Minimum, nil] # # @param minimum_amount [String, nil] @@ -11291,17 +12642,17 @@ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] # - # @param price_type [Symbol, Orb::Models::Price::CumulativeGroupedAllocation::PriceType] + # @param price_type [Symbol, Orb::Models::Price::MeteredAllowance::PriceType] # # @param replaces_price_id [String, nil] The price id this price replaces. This price will take the place of the replaced # # @param dimensional_price_configuration [Orb::Models::DimensionalPriceConfiguration, nil] # - # @param license_type [Orb::Models::Price::CumulativeGroupedAllocation::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us + # @param license_type [Orb::Models::Price::MeteredAllowance::LicenseType, nil] The LicenseType resource represents a type of license that can be assigned to us # - # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type + # @param model_type [Symbol, :metered_allowance] The pricing model type - # @see Orb::Models::Price::CumulativeGroupedAllocation#billing_mode + # @see Orb::Models::Price::MeteredAllowance#billing_mode module BillingMode extend Orb::Internal::Type::Enum @@ -11312,7 +12663,7 @@ module BillingMode # @return [Array] end - # @see Orb::Models::Price::CumulativeGroupedAllocation#cadence + # @see Orb::Models::Price::MeteredAllowance#cadence module Cadence extend Orb::Internal::Type::Enum @@ -11331,14 +12682,14 @@ class CompositePriceFilter < Orb::Internal::Type::BaseModel # @!attribute field # The property of the price to filter on. # - # @return [Symbol, Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter::Field] - required :field, enum: -> { Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Field } + # @return [Symbol, Orb::Models::Price::MeteredAllowance::CompositePriceFilter::Field] + required :field, enum: -> { Orb::Price::MeteredAllowance::CompositePriceFilter::Field } # @!attribute operator # Should prices that match the filter be included or excluded. # - # @return [Symbol, Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter::Operator] - required :operator, enum: -> { Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Operator } + # @return [Symbol, Orb::Models::Price::MeteredAllowance::CompositePriceFilter::Operator] + required :operator, enum: -> { Orb::Price::MeteredAllowance::CompositePriceFilter::Operator } # @!attribute values # The IDs or values that match this filter. @@ -11347,15 +12698,15 @@ class CompositePriceFilter < Orb::Internal::Type::BaseModel required :values, Orb::Internal::Type::ArrayOf[String] # @!method initialize(field:, operator:, values:) - # @param field [Symbol, Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter::Field] The property of the price to filter on. + # @param field [Symbol, Orb::Models::Price::MeteredAllowance::CompositePriceFilter::Field] The property of the price to filter on. # - # @param operator [Symbol, Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. + # @param operator [Symbol, Orb::Models::Price::MeteredAllowance::CompositePriceFilter::Operator] Should prices that match the filter be included or excluded. # # @param values [Array] The IDs or values that match this filter. # The property of the price to filter on. # - # @see Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter#field + # @see Orb::Models::Price::MeteredAllowance::CompositePriceFilter#field module Field extend Orb::Internal::Type::Enum @@ -11371,7 +12722,7 @@ module Field # Should prices that match the filter be included or excluded. # - # @see Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter#operator + # @see Orb::Models::Price::MeteredAllowance::CompositePriceFilter#operator module Operator extend Orb::Internal::Type::Enum @@ -11383,45 +12734,69 @@ module Operator end end - # @see Orb::Models::Price::CumulativeGroupedAllocation#cumulative_grouped_allocation_config - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute cumulative_allocation - # The overall allocation across all groups + # @see Orb::Models::Price::MeteredAllowance#metered_allowance_config + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute allowance_grouping_value + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. # # @return [String] - required :cumulative_allocation, String + required :allowance_grouping_value, String - # @!attribute group_allocation - # The allocation per individual group + # @!attribute consumption_grouping_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. # # @return [String] - required :group_allocation, String + required :consumption_grouping_value, String # @!attribute grouping_key - # The event property used to group usage before applying allocations + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. # # @return [String] required :grouping_key, String # @!attribute unit_amount - # The amount to charge for each unit outside of the allocation + # Per-unit price applied to gross consumption and to the allowance credit. # # @return [String] required :unit_amount, String - # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:) - # Configuration for cumulative_grouped_allocation pricing + # @!attribute allowance_display_name + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). # - # @param cumulative_allocation [String] The overall allocation across all groups + # @return [String, nil] + optional :allowance_display_name, String + + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). # - # @param group_allocation [String] The allocation per individual group + # @return [String, nil] + optional :consumption_display_name, String + + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::Price::MeteredAllowance::MeteredAllowanceConfig} for more details. # - # @param grouping_key [String] The event property used to group usage before applying allocations + # Configuration for metered_allowance pricing # - # @param unit_amount [String] The amount to charge for each unit outside of the allocation + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p + # + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl + # + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant + # + # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit. + # + # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten'). end - # @see Orb::Models::Price::CumulativeGroupedAllocation#price_type + # @see Orb::Models::Price::MeteredAllowance#price_type module PriceType extend Orb::Internal::Type::Enum @@ -11433,7 +12808,7 @@ module PriceType # @return [Array] end - # @see Orb::Models::Price::CumulativeGroupedAllocation#license_type + # @see Orb::Models::Price::MeteredAllowance#license_type class LicenseType < Orb::Internal::Type::BaseModel # @!attribute id # The Orb-assigned unique identifier for the license type. @@ -11456,7 +12831,7 @@ class LicenseType < Orb::Internal::Type::BaseModel # @!method initialize(id:, grouping_key:, name:) # Some parameter documentations has been truncated, see - # {Orb::Models::Price::CumulativeGroupedAllocation::LicenseType} for more details. + # {Orb::Models::Price::MeteredAllowance::LicenseType} for more details. # # The LicenseType resource represents a type of license that can be assigned to # users. License types are used during billing by grouping metrics on the @@ -12647,7 +14022,7 @@ class LicenseType < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput)] + # @return [Array(Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput)] end end end diff --git a/lib/orb/models/price_create_params.rb b/lib/orb/models/price_create_params.rb index ff7703d6..0a774796 100644 --- a/lib/orb/models/price_create_params.rb +++ b/lib/orb/models/price_create_params.rb @@ -10,11 +10,11 @@ class PriceCreateParams < Orb::Internal::Type::BaseModel # @!attribute body # New floating price request body params. # - # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput] + # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::PriceCreateParams::Body::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput] required :body, union: -> { Orb::PriceCreateParams::Body } # @!method initialize(body:, request_options: {}) - # @param body [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput] New floating price request body params. + # @param body [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::PriceCreateParams::Body::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput] New floating price request body params. # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] @@ -52,6 +52,9 @@ module Body variant :matrix_with_allocation, -> { Orb::NewFloatingMatrixWithAllocationPrice } + variant :matrix_with_threshold_discounts, + -> { Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts } + variant :tiered_with_proration, -> { Orb::NewFloatingTieredWithProrationPrice } variant :unit_with_proration, -> { Orb::NewFloatingUnitWithProrationPrice } @@ -80,6 +83,10 @@ module Body variant :cumulative_grouped_allocation, -> { Orb::PriceCreateParams::Body::CumulativeGroupedAllocation } + variant :daily_credit_allowance, -> { Orb::PriceCreateParams::Body::DailyCreditAllowance } + + variant :metered_allowance, -> { Orb::PriceCreateParams::Body::MeteredAllowance } + variant :minimum_composite, -> { Orb::NewFloatingMinimumCompositePrice } variant :percent, -> { Orb::PriceCreateParams::Body::Percent } @@ -329,6 +336,311 @@ module Cadence end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence] + required :cadence, enum: -> { Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute matrix_with_threshold_discounts_config + # Configuration for matrix_with_threshold_discounts pricing + # + # @return [Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] + required :matrix_with_threshold_discounts_config, + -> { Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :matrix_with_threshold_discounts] + required :model_type, const: :matrix_with_threshold_discounts + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::ConversionRateConfig + }, + nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!method initialize(cadence:, currency:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :matrix_with_threshold_discounts) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts} for more + # details. + # + # @param cadence [Symbol, Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on. + # + # @param currency [String] An ISO 4217 currency string for which this price is billed in. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param matrix_with_threshold_discounts_config [Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + # @!attribute default_unit_amount + # Unit price used for usage that does not match any defined matrix cell. + # + # @return [String] + required :default_unit_amount, String + + # @!attribute first_dimension + # First matrix dimension key. + # + # @return [String] + required :first_dimension, String + + # @!attribute matrix_values + # Per-cell unit prices. + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + end + + # @!attribute second_dimension + # Optional second matrix dimension key. + # + # @return [String, nil] + optional :second_dimension, String, nil?: true + + # @!attribute threshold_discount_groups + # + # @return [Array, nil] + optional :threshold_discount_groups, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + end + + # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil) + # Configuration for matrix_with_threshold_discounts pricing + # + # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell. + # + # @param first_dimension [String] First matrix dimension key. + # + # @param matrix_values [Array] Per-cell unit prices. + # + # @param second_dimension [String, nil] Optional second matrix dimension key. + # + # @param threshold_discount_groups [Array] + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute first_dimension_value + # + # @return [String] + required :first_dimension_value, String + + # @!attribute unit_amount + # + # @return [String] + required :unit_amount, String + + # @!attribute second_dimension_value + # + # @return [String, nil] + optional :second_dimension_value, String, nil?: true + + # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil) + # @param first_dimension_value [String] + # @param unit_amount [String] + # @param second_dimension_value [String, nil] + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + # @!attribute above_threshold_discount_percentage + # Discount rate applied to spend above the threshold. + # + # @return [String] + required :above_threshold_discount_percentage, String + + # @!attribute below_threshold_discount_percentage + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + # + # @return [String] + required :below_threshold_discount_percentage, String + + # @!attribute cell_coordinates + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + # + # @return [String] + required :cell_coordinates, String + + # @!attribute threshold_amount + # + # @return [String] + required :threshold_amount, String + + # @!attribute description + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup} + # for more details. + # + # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold. + # + # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli + # + # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # + # @param threshold_amount [String] + # + # @param description [String, nil] + end + end + end + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -765,6 +1077,504 @@ class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::Cadence] + required :cadence, enum: -> { Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute daily_credit_allowance_config + # Configuration for daily_credit_allowance pricing + # + # @return [Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig] + required :daily_credit_allowance_config, + -> { Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { Orb::PriceCreateParams::Body::DailyCreditAllowance::ConversionRateConfig }, + nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!method initialize(cadence:, currency:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :daily_credit_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceCreateParams::Body::DailyCreditAllowance} for more details. + # + # @param cadence [Symbol, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::Cadence] The cadence to bill for this price on. + # + # @param currency [String] An ISO 4217 currency string for which this price is billed in. + # + # @param daily_credit_allowance_config [Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param model_type [Symbol, :daily_credit_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::PriceCreateParams::Body::DailyCreditAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::PriceCreateParams::Body::DailyCreditAllowance#daily_credit_allowance_config + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute daily_allowance + # Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @return [String] + required :daily_allowance, String + + # @!attribute default_unit_amount + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + # + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute event_day_property + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + # + # @return [String] + required :event_day_property, String + + # @!attribute matrix_values + # Per-dimension credit rates + # + # @return [Array] + required :matrix_values, + -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] } + + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig} + # for more details. + # + # Configuration for daily_credit_allowance pricing + # + # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified + # matrix\_ + # + # @param dimensions [Array] One or two event property values to evaluate matrix groups by + # + # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g. + # + # @param matrix_values [Array] Per-dimension credit rates + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + # + # @return [Array] + required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Credits charged per unit of usage matching the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!method initialize(dimension_values:, unit_amount:) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue} + # for more details. + # + # Per-dimension credit price for the daily credit allowance model. + # + # @param dimension_values [Array] One or two matrix keys to filter usage to this value by. For example, ["model"] + # + # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values + end + end + end + + class MeteredAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::PriceCreateParams::Body::MeteredAllowance::Cadence] + required :cadence, enum: -> { Orb::PriceCreateParams::Body::MeteredAllowance::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing + # + # @return [Orb::Models::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, + -> { Orb::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { Orb::PriceCreateParams::Body::MeteredAllowance::ConversionRateConfig }, + nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!method initialize(cadence:, currency:, item_id:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :metered_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceCreateParams::Body::MeteredAllowance} for more details. + # + # @param cadence [Symbol, Orb::Models::PriceCreateParams::Body::MeteredAllowance::Cadence] The cadence to bill for this price on. + # + # @param currency [String] An ISO 4217 currency string for which this price is billed in. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param metered_allowance_config [Orb::Models::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param model_type [Symbol, :metered_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::PriceCreateParams::Body::MeteredAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::PriceCreateParams::Body::MeteredAllowance#metered_allowance_config + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute allowance_grouping_value + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + # + # @return [String] + required :allowance_grouping_value, String + + # @!attribute consumption_grouping_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + # + # @return [String] + required :consumption_grouping_value, String + + # @!attribute grouping_key + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + # + # @return [String] + required :grouping_key, String + + # @!attribute unit_amount + # Per-unit price applied to gross consumption and to the allowance credit. + # + # @return [String] + required :unit_amount, String + + # @!attribute allowance_display_name + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @return [String, nil] + optional :allowance_display_name, String + + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + # + # @return [String, nil] + optional :consumption_display_name, String + + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig} + # for more details. + # + # Configuration for metered_allowance pricing + # + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p + # + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl + # + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant + # + # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit. + # + # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -1169,7 +1979,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput)] + # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::PriceCreateParams::Body::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput)] end end end diff --git a/lib/orb/models/price_evaluate_multiple_params.rb b/lib/orb/models/price_evaluate_multiple_params.rb index d068cc76..68ac4b33 100644 --- a/lib/orb/models/price_evaluate_multiple_params.rb +++ b/lib/orb/models/price_evaluate_multiple_params.rb @@ -86,7 +86,7 @@ class PriceEvaluation < Orb::Internal::Type::BaseModel # @!attribute price # New floating price request body params. # - # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput, nil] + # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput, nil] optional :price, union: -> { Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price }, nil?: true # @!attribute price_id @@ -107,7 +107,7 @@ class PriceEvaluation < Orb::Internal::Type::BaseModel # # @param metric_parameter_overrides [Hash{Symbol=>Object}, nil] Optional overrides for parameterized billable metric parameters. If the metric h # - # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput, nil] New floating price request body params. + # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput, nil] New floating price request body params. # # @param price_id [String, nil] The ID of a price to evaluate that exists in your Orb account. @@ -148,6 +148,9 @@ module Price variant :matrix_with_allocation, -> { Orb::NewFloatingMatrixWithAllocationPrice } + variant :matrix_with_threshold_discounts, + -> { Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts } + variant :tiered_with_proration, -> { Orb::NewFloatingTieredWithProrationPrice } variant :unit_with_proration, -> { Orb::NewFloatingUnitWithProrationPrice } @@ -178,6 +181,12 @@ module Price variant :cumulative_grouped_allocation, -> { Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation } + variant :daily_credit_allowance, + -> { Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance } + + variant :metered_allowance, + -> { Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance } + variant :minimum_composite, -> { Orb::NewFloatingMinimumCompositePrice } variant :percent, -> { Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent } @@ -435,6 +444,316 @@ module Cadence end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence] + required :cadence, + enum: -> { Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute matrix_with_threshold_discounts_config + # Configuration for matrix_with_threshold_discounts pricing + # + # @return [Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] + required :matrix_with_threshold_discounts_config, + -> { Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :matrix_with_threshold_discounts] + required :model_type, const: :matrix_with_threshold_discounts + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::ConversionRateConfig + }, + nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!method initialize(cadence:, currency:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :matrix_with_threshold_discounts) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts} + # for more details. + # + # @param cadence [Symbol, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on. + # + # @param currency [String] An ISO 4217 currency string for which this price is billed in. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param matrix_with_threshold_discounts_config [Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + # @!attribute default_unit_amount + # Unit price used for usage that does not match any defined matrix cell. + # + # @return [String] + required :default_unit_amount, String + + # @!attribute first_dimension + # First matrix dimension key. + # + # @return [String] + required :first_dimension, String + + # @!attribute matrix_values + # Per-cell unit prices. + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + end + + # @!attribute second_dimension + # Optional second matrix dimension key. + # + # @return [String, nil] + optional :second_dimension, String, nil?: true + + # @!attribute threshold_discount_groups + # + # @return [Array, nil] + optional :threshold_discount_groups, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + end + + # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil) + # Configuration for matrix_with_threshold_discounts pricing + # + # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell. + # + # @param first_dimension [String] First matrix dimension key. + # + # @param matrix_values [Array] Per-cell unit prices. + # + # @param second_dimension [String, nil] Optional second matrix dimension key. + # + # @param threshold_discount_groups [Array] + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute first_dimension_value + # + # @return [String] + required :first_dimension_value, String + + # @!attribute unit_amount + # + # @return [String] + required :unit_amount, String + + # @!attribute second_dimension_value + # + # @return [String, nil] + optional :second_dimension_value, String, nil?: true + + # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil) + # @param first_dimension_value [String] + # @param unit_amount [String] + # @param second_dimension_value [String, nil] + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + # @!attribute above_threshold_discount_percentage + # Discount rate applied to spend above the threshold. + # + # @return [String] + required :above_threshold_discount_percentage, String + + # @!attribute below_threshold_discount_percentage + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + # + # @return [String] + required :below_threshold_discount_percentage, String + + # @!attribute cell_coordinates + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + # + # @return [String] + required :cell_coordinates, String + + # @!attribute threshold_amount + # + # @return [String] + required :threshold_amount, String + + # @!attribute description + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup} + # for more details. + # + # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold. + # + # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli + # + # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # + # @param threshold_amount [String] + # + # @param description [String, nil] + end + end + end + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -881,6 +1200,524 @@ class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence] + required :cadence, + enum: -> { Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute daily_credit_allowance_config + # Configuration for daily_credit_allowance pricing + # + # @return [Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] + required :daily_credit_allowance_config, + -> { Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!method initialize(cadence:, currency:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :daily_credit_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance} + # for more details. + # + # @param cadence [Symbol, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence] The cadence to bill for this price on. + # + # @param currency [String] An ISO 4217 currency string for which this price is billed in. + # + # @param daily_credit_allowance_config [Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param model_type [Symbol, :daily_credit_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance#daily_credit_allowance_config + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute daily_allowance + # Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @return [String] + required :daily_allowance, String + + # @!attribute default_unit_amount + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + # + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute event_day_property + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + # + # @return [String] + required :event_day_property, String + + # @!attribute matrix_values + # Per-dimension credit rates + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + end + + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig} + # for more details. + # + # Configuration for daily_credit_allowance pricing + # + # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified + # matrix\_ + # + # @param dimensions [Array] One or two event property values to evaluate matrix groups by + # + # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g. + # + # @param matrix_values [Array] Per-dimension credit rates + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + # + # @return [Array] + required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Credits charged per unit of usage matching the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!method initialize(dimension_values:, unit_amount:) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue} + # for more details. + # + # Per-dimension credit price for the daily credit allowance model. + # + # @param dimension_values [Array] One or two matrix keys to filter usage to this value by. For example, ["model"] + # + # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values + end + end + end + + class MeteredAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence] + required :cadence, + enum: -> { Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing + # + # @return [Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, + -> { Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!method initialize(cadence:, currency:, item_id:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :metered_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance} + # for more details. + # + # @param cadence [Symbol, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence] The cadence to bill for this price on. + # + # @param currency [String] An ISO 4217 currency string for which this price is billed in. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param metered_allowance_config [Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param model_type [Symbol, :metered_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance#metered_allowance_config + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute allowance_grouping_value + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + # + # @return [String] + required :allowance_grouping_value, String + + # @!attribute consumption_grouping_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + # + # @return [String] + required :consumption_grouping_value, String + + # @!attribute grouping_key + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + # + # @return [String] + required :grouping_key, String + + # @!attribute unit_amount + # Per-unit price applied to gross consumption and to the allowance credit. + # + # @return [String] + required :unit_amount, String + + # @!attribute allowance_display_name + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @return [String, nil] + optional :allowance_display_name, String + + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + # + # @return [String, nil] + optional :consumption_display_name, String + + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig} + # for more details. + # + # Configuration for metered_allowance pricing + # + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p + # + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl + # + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant + # + # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit. + # + # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -1302,7 +2139,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput)] + # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput)] end end end diff --git a/lib/orb/models/price_evaluate_preview_events_params.rb b/lib/orb/models/price_evaluate_preview_events_params.rb index 9efa6f4c..4acd55eb 100644 --- a/lib/orb/models/price_evaluate_preview_events_params.rb +++ b/lib/orb/models/price_evaluate_preview_events_params.rb @@ -144,7 +144,7 @@ class PriceEvaluation < Orb::Internal::Type::BaseModel # @!attribute price # New floating price request body params. # - # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput, nil] + # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput, nil] optional :price, union: -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price @@ -170,7 +170,7 @@ class PriceEvaluation < Orb::Internal::Type::BaseModel # # @param metric_parameter_overrides [Hash{Symbol=>Object}, nil] Optional overrides for parameterized billable metric parameters. If the metric h # - # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput, nil] New floating price request body params. + # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput, nil] New floating price request body params. # # @param price_id [String, nil] The ID of a price to evaluate that exists in your Orb account. @@ -211,6 +211,9 @@ module Price variant :matrix_with_allocation, -> { Orb::NewFloatingMatrixWithAllocationPrice } + variant :matrix_with_threshold_discounts, + -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts } + variant :tiered_with_proration, -> { Orb::NewFloatingTieredWithProrationPrice } variant :unit_with_proration, -> { Orb::NewFloatingUnitWithProrationPrice } @@ -241,6 +244,12 @@ module Price variant :cumulative_grouped_allocation, -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation } + variant :daily_credit_allowance, + -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance } + + variant :metered_allowance, + -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance } + variant :minimum_composite, -> { Orb::NewFloatingMinimumCompositePrice } variant :percent, -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent } @@ -506,6 +515,316 @@ module Cadence end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence] + required :cadence, + enum: -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute matrix_with_threshold_discounts_config + # Configuration for matrix_with_threshold_discounts pricing + # + # @return [Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] + required :matrix_with_threshold_discounts_config, + -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :matrix_with_threshold_discounts] + required :model_type, const: :matrix_with_threshold_discounts + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::ConversionRateConfig + }, + nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!method initialize(cadence:, currency:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :matrix_with_threshold_discounts) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts} + # for more details. + # + # @param cadence [Symbol, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on. + # + # @param currency [String] An ISO 4217 currency string for which this price is billed in. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param matrix_with_threshold_discounts_config [Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + # @!attribute default_unit_amount + # Unit price used for usage that does not match any defined matrix cell. + # + # @return [String] + required :default_unit_amount, String + + # @!attribute first_dimension + # First matrix dimension key. + # + # @return [String] + required :first_dimension, String + + # @!attribute matrix_values + # Per-cell unit prices. + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + end + + # @!attribute second_dimension + # Optional second matrix dimension key. + # + # @return [String, nil] + optional :second_dimension, String, nil?: true + + # @!attribute threshold_discount_groups + # + # @return [Array, nil] + optional :threshold_discount_groups, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + end + + # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil) + # Configuration for matrix_with_threshold_discounts pricing + # + # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell. + # + # @param first_dimension [String] First matrix dimension key. + # + # @param matrix_values [Array] Per-cell unit prices. + # + # @param second_dimension [String, nil] Optional second matrix dimension key. + # + # @param threshold_discount_groups [Array] + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute first_dimension_value + # + # @return [String] + required :first_dimension_value, String + + # @!attribute unit_amount + # + # @return [String] + required :unit_amount, String + + # @!attribute second_dimension_value + # + # @return [String, nil] + optional :second_dimension_value, String, nil?: true + + # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil) + # @param first_dimension_value [String] + # @param unit_amount [String] + # @param second_dimension_value [String, nil] + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + # @!attribute above_threshold_discount_percentage + # Discount rate applied to spend above the threshold. + # + # @return [String] + required :above_threshold_discount_percentage, String + + # @!attribute below_threshold_discount_percentage + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + # + # @return [String] + required :below_threshold_discount_percentage, String + + # @!attribute cell_coordinates + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + # + # @return [String] + required :cell_coordinates, String + + # @!attribute threshold_amount + # + # @return [String] + required :threshold_amount, String + + # @!attribute description + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup} + # for more details. + # + # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold. + # + # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli + # + # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # + # @param threshold_amount [String] + # + # @param description [String, nil] + end + end + end + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -952,6 +1271,524 @@ class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence] + required :cadence, + enum: -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute daily_credit_allowance_config + # Configuration for daily_credit_allowance pricing + # + # @return [Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] + required :daily_credit_allowance_config, + -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!method initialize(cadence:, currency:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :daily_credit_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance} + # for more details. + # + # @param cadence [Symbol, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence] The cadence to bill for this price on. + # + # @param currency [String] An ISO 4217 currency string for which this price is billed in. + # + # @param daily_credit_allowance_config [Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param model_type [Symbol, :daily_credit_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance#daily_credit_allowance_config + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute daily_allowance + # Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @return [String] + required :daily_allowance, String + + # @!attribute default_unit_amount + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + # + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute event_day_property + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + # + # @return [String] + required :event_day_property, String + + # @!attribute matrix_values + # Per-dimension credit rates + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + end + + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig} + # for more details. + # + # Configuration for daily_credit_allowance pricing + # + # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified + # matrix\_ + # + # @param dimensions [Array] One or two event property values to evaluate matrix groups by + # + # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g. + # + # @param matrix_values [Array] Per-dimension credit rates + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + # + # @return [Array] + required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Credits charged per unit of usage matching the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!method initialize(dimension_values:, unit_amount:) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue} + # for more details. + # + # Per-dimension credit price for the daily credit allowance model. + # + # @param dimension_values [Array] One or two matrix keys to filter usage to this value by. For example, ["model"] + # + # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values + end + end + end + + class MeteredAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence] + required :cadence, + enum: -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing + # + # @return [Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, + -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!method initialize(cadence:, currency:, item_id:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :metered_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance} + # for more details. + # + # @param cadence [Symbol, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence] The cadence to bill for this price on. + # + # @param currency [String] An ISO 4217 currency string for which this price is billed in. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param metered_allowance_config [Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param model_type [Symbol, :metered_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance#metered_allowance_config + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute allowance_grouping_value + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + # + # @return [String] + required :allowance_grouping_value, String + + # @!attribute consumption_grouping_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + # + # @return [String] + required :consumption_grouping_value, String + + # @!attribute grouping_key + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + # + # @return [String] + required :grouping_key, String + + # @!attribute unit_amount + # Per-unit price applied to gross consumption and to the allowance credit. + # + # @return [String] + required :unit_amount, String + + # @!attribute allowance_display_name + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @return [String, nil] + optional :allowance_display_name, String + + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + # + # @return [String, nil] + optional :consumption_display_name, String + + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig} + # for more details. + # + # Configuration for metered_allowance pricing + # + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p + # + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl + # + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant + # + # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit. + # + # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -1374,7 +2211,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput)] + # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput)] end end end diff --git a/lib/orb/models/price_interval.rb b/lib/orb/models/price_interval.rb index 5dd67808..dc333b58 100644 --- a/lib/orb/models/price_interval.rb +++ b/lib/orb/models/price_interval.rb @@ -72,7 +72,7 @@ class PriceInterval < Orb::Internal::Type::BaseModel # For more on the types of prices, see # [the core concepts documentation](/core-concepts#plan-and-price) # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] required :price, union: -> { Orb::Price } # @!attribute start_date @@ -122,7 +122,7 @@ class PriceInterval < Orb::Internal::Type::BaseModel # # @param fixed_fee_quantity_transitions [Array, nil] The fixed fee quantity transitions for this price interval. This is only relevan # - # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu + # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu # # @param start_date [Time] The start date of the price interval. This is the date that Orb starts billing f # diff --git a/lib/orb/models/subscription_create_params.rb b/lib/orb/models/subscription_create_params.rb index 5ec065b6..7d323321 100644 --- a/lib/orb/models/subscription_create_params.rb +++ b/lib/orb/models/subscription_create_params.rb @@ -449,7 +449,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # @!attribute price # New subscription price request body params. # - # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput, nil] + # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput, nil] optional :price, union: -> { Orb::SubscriptionCreateParams::AddPrice::Price }, nil?: true # @!attribute price_id @@ -486,7 +486,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] The phase to add this price to. # - # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput, nil] New subscription price request body params. + # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput, nil] New subscription price request body params. # # @param price_id [String, nil] The id of the price to add to the subscription. # @@ -528,6 +528,9 @@ module Price variant :matrix_with_allocation, -> { Orb::NewSubscriptionMatrixWithAllocationPrice } + variant :matrix_with_threshold_discounts, + -> { Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts } + variant :tiered_with_proration, -> { Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration } variant :unit_with_proration, -> { Orb::NewSubscriptionUnitWithProrationPrice } @@ -559,6 +562,11 @@ module Price variant :cumulative_grouped_allocation, -> { Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation } + variant :daily_credit_allowance, + -> { Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance } + + variant :metered_allowance, -> { Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance } + variant :minimum_composite, -> { Orb::NewSubscriptionMinimumCompositePrice } variant :percent, -> { Orb::SubscriptionCreateParams::AddPrice::Price::Percent } @@ -825,6 +833,326 @@ module Cadence end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence] + required :cadence, + enum: -> { Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute matrix_with_threshold_discounts_config + # Configuration for matrix_with_threshold_discounts pricing + # + # @return [Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] + required :matrix_with_threshold_discounts_config, + -> { Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :matrix_with_threshold_discounts] + required :model_type, const: :matrix_with_threshold_discounts + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_threshold_discounts) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts} + # for more details. + # + # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param matrix_with_threshold_discounts_config [Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + # @!attribute default_unit_amount + # Unit price used for usage that does not match any defined matrix cell. + # + # @return [String] + required :default_unit_amount, String + + # @!attribute first_dimension + # First matrix dimension key. + # + # @return [String] + required :first_dimension, String + + # @!attribute matrix_values + # Per-cell unit prices. + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + end + + # @!attribute second_dimension + # Optional second matrix dimension key. + # + # @return [String, nil] + optional :second_dimension, String, nil?: true + + # @!attribute threshold_discount_groups + # + # @return [Array, nil] + optional :threshold_discount_groups, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + end + + # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil) + # Configuration for matrix_with_threshold_discounts pricing + # + # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell. + # + # @param first_dimension [String] First matrix dimension key. + # + # @param matrix_values [Array] Per-cell unit prices. + # + # @param second_dimension [String, nil] Optional second matrix dimension key. + # + # @param threshold_discount_groups [Array] + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute first_dimension_value + # + # @return [String] + required :first_dimension_value, String + + # @!attribute unit_amount + # + # @return [String] + required :unit_amount, String + + # @!attribute second_dimension_value + # + # @return [String, nil] + optional :second_dimension_value, String, nil?: true + + # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil) + # @param first_dimension_value [String] + # @param unit_amount [String] + # @param second_dimension_value [String, nil] + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + # @!attribute above_threshold_discount_percentage + # Discount rate applied to spend above the threshold. + # + # @return [String] + required :above_threshold_discount_percentage, String + + # @!attribute below_threshold_discount_percentage + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + # + # @return [String] + required :below_threshold_discount_percentage, String + + # @!attribute cell_coordinates + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + # + # @return [String] + required :cell_coordinates, String + + # @!attribute threshold_amount + # + # @return [String] + required :threshold_amount, String + + # @!attribute description + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup} + # for more details. + # + # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold. + # + # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli + # + # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # + # @param threshold_amount [String] + # + # @param description [String, nil] + end + end + end + class TieredWithProration < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -1527,12 +1855,20 @@ class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel end end - class Percent < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence] - required :cadence, enum: -> { Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence } + # @return [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence] + required :cadence, + enum: -> { Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence } + + # @!attribute daily_credit_allowance_config + # Configuration for daily_credit_allowance pricing + # + # @return [Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] + required :daily_credit_allowance_config, + -> { Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig } # @!attribute item_id # The id of the item the price will be associated with. @@ -1543,8 +1879,8 @@ class Percent < Orb::Internal::Type::BaseModel # @!attribute model_type # The pricing model type # - # @return [Symbol, :percent] - required :model_type, const: :percent + # @return [Symbol, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance # @!attribute name # The name of the price. @@ -1552,12 +1888,6 @@ class Percent < Orb::Internal::Type::BaseModel # @return [String] required :name, String - # @!attribute percent_config - # Configuration for percent pricing - # - # @return [Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig] - required :percent_config, -> { Orb::SubscriptionCreateParams::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. @@ -1591,7 +1921,7 @@ class Percent < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::ConversionRateConfig + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::ConversionRateConfig }, nil?: true @@ -1659,19 +1989,19 @@ 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:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :daily_credit_allowance) # Some parameter documentations has been truncated, see - # {Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent} for more - # details. + # {Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance} + # for more details. # - # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence] The cadence to bill for this price on. + # + # @param daily_credit_allowance_config [Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing # # @param item_id [String] The id of the item the price will be associated with. # # @param name [String] The name of the price. # - # @param percent_config [Orb::Models::SubscriptionCreateParams::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 @@ -1700,11 +2030,11 @@ class Percent < 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, :percent] The pricing model type + # @param model_type [Symbol, :daily_credit_allowance] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent#cadence + # @see Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1719,34 +2049,98 @@ module Cadence # @return [Array] end - # @see Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent#percent_config - class PercentConfig < Orb::Internal::Type::BaseModel - # @!attribute percent - # What percent of the component subtotals to charge + # @see Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance#daily_credit_allowance_config + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute daily_allowance + # Credits granted per day. Lose-it-or-use-it; does not roll over. # - # @return [Float] - required :percent, Float + # @return [String] + required :daily_allowance, String - # @!method initialize(percent:) - # Configuration for percent pricing + # @!attribute default_unit_amount + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value # - # @param percent [Float] What percent of the component subtotals to charge + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute event_day_property + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + # + # @return [String] + required :event_day_property, String + + # @!attribute matrix_values + # Per-dimension credit rates + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + end + + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig} + # for more details. + # + # Configuration for daily_credit_allowance pricing + # + # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified + # matrix\_ + # + # @param dimensions [Array] One or two event property values to evaluate matrix groups by + # + # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g. + # + # @param matrix_values [Array] Per-dimension credit rates + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + # + # @return [Array] + required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Credits charged per unit of usage matching the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!method initialize(dimension_values:, unit_amount:) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue} + # for more details. + # + # Per-dimension credit price for the daily credit allowance model. + # + # @param dimension_values [Array] One or two matrix keys to filter usage to this value by. For example, ["model"] + # + # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values + end end end - class EventOutput < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence] - required :cadence, enum: -> { Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence } - - # @!attribute event_output_config - # Configuration for event_output pricing - # - # @return [Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig] - required :event_output_config, - -> { Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig } + # @return [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence] + required :cadence, enum: -> { Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -1754,11 +2148,18 @@ class EventOutput < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing + # + # @return [Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, + -> { Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig } + # @!attribute model_type # The pricing model type # - # @return [Symbol, :event_output] - required :model_type, const: :event_output + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance # @!attribute name # The name of the price. @@ -1799,7 +2200,7 @@ class EventOutput < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::ConversionRateConfig + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::ConversionRateConfig }, nil?: true @@ -1867,17 +2268,17 @@ 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:, item_id:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :metered_allowance) # Some parameter documentations has been truncated, see - # {Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput} for more - # details. - # - # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence] The cadence to bill for this price on. + # {Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance} for + # more details. # - # @param event_output_config [Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig] Configuration for event_output pricing + # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # + # @param metered_allowance_config [Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing + # # @param name [String] The name of the price. # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b @@ -1908,11 +2309,11 @@ class EventOutput < 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, :event_output] The pricing model type + # @param model_type [Symbol, :metered_allowance] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput#cadence + # @see Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1927,317 +2328,1606 @@ module Cadence # @return [Array] end - # @see Orb::Models::SubscriptionCreateParams::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. + # @see Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance#metered_allowance_config + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute allowance_grouping_value + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. # # @return [String] - required :unit_rating_key, String + required :allowance_grouping_value, 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. + # @!attribute consumption_grouping_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. # - # @return [String, nil] - optional :default_unit_rate, String, nil?: true + # @return [String] + required :consumption_grouping_value, String # @!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. + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + # + # @return [String] + required :grouping_key, String + + # @!attribute unit_amount + # Per-unit price applied to gross consumption and to the allowance credit. + # + # @return [String] + required :unit_amount, String + + # @!attribute allowance_display_name + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). # # @return [String, nil] - optional :grouping_key, String, nil?: true + optional :allowance_display_name, String - # @!method initialize(unit_rating_key:, default_unit_rate: nil, grouping_key: nil) + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + # + # @return [String, nil] + optional :consumption_display_name, String + + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) # Some parameter documentations has been truncated, see - # {Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig} + # {Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig} # for more details. # - # Configuration for event_output pricing + # Configuration for metered_allowance pricing # - # @param unit_rating_key [String] The key in the event data to extract the unit rate from. + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p # - # @param default_unit_rate [String, nil] If provided, this amount will be used as the unit rate when an event does not ha + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl # - # @param grouping_key [String, nil] An optional key in the event data to group by (e.g., event ID). All events will + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant + # + # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit. + # + # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten'). end end - # @!method self.variants - # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput)] - end - end - - # @deprecated - module ExternalMarketplace - extend Orb::Internal::Type::Enum - - GOOGLE = :google - AWS = :aws - AZURE = :azure - - # @!method self.values - # @return [Array] - end + class Percent < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence] + required :cadence, enum: -> { Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence } - class RemoveAdjustment < Orb::Internal::Type::BaseModel - # @!attribute adjustment_id - # The id of the adjustment to remove on the subscription. - # - # @return [String] - required :adjustment_id, String + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String - # @!method initialize(adjustment_id:) - # @param adjustment_id [String] The id of the adjustment to remove on the subscription. - end + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :percent] + required :model_type, const: :percent - class RemovePrice < Orb::Internal::Type::BaseModel - # @!attribute external_price_id - # The external price id of the price to remove on the subscription. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String - # @!attribute price_id - # The id of the price to remove on the subscription. - # - # @return [String, nil] - optional :price_id, String, nil?: true + # @!attribute percent_config + # Configuration for percent pricing + # + # @return [Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig] + required :percent_config, -> { Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig } - # @!method initialize(external_price_id: nil, price_id: nil) - # @param external_price_id [String, nil] The external price id of the price to remove on the subscription. - # - # @param price_id [String, nil] The id of the price to remove on the subscription. - 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 ReplaceAdjustment < Orb::Internal::Type::BaseModel - # @!attribute adjustment - # The definition of a new adjustment to create and add to the subscription. - # - # @return [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum] - required :adjustment, union: -> { Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment } + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - # @!attribute replaces_adjustment_id - # The id of the adjustment on the plan to replace in the subscription. - # - # @return [String] - required :replaces_adjustment_id, String + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - # @!method initialize(adjustment:, replaces_adjustment_id:) - # @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 subscription. - # - # @param replaces_adjustment_id [String] The id of the adjustment on the plan to replace in the subscription. + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true - # The definition of a new adjustment to create and add to the subscription. - # - # @see Orb::Models::SubscriptionCreateParams::ReplaceAdjustment#adjustment - module Adjustment - extend Orb::Internal::Type::Union + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::ConversionRateConfig + }, + nil?: true - discriminator :adjustment_type + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true - variant :percentage_discount, -> { Orb::NewPercentageDiscount } + # @!attribute dimensional_price_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 :usage_discount, -> { Orb::NewUsageDiscount } + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true - variant :amount_discount, -> { Orb::NewAmountDiscount } + # @!attribute fixed_price_quantity + # 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 :minimum, -> { Orb::NewMinimum } + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used 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::SubscriptionCreateParams::AddPrice::Price::Percent} for more + # details. + # + # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::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::SubscriptionCreateParams::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::SubscriptionCreateParams::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::SubscriptionCreateParams::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::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence] + required :cadence, enum: -> { Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence } + + # @!attribute event_output_config + # Configuration for event_output pricing + # + # @return [Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig] + required :event_output_config, + -> { Orb::SubscriptionCreateParams::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::SubscriptionCreateParams::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::SubscriptionCreateParams::AddPrice::Price::EventOutput} for more + # details. + # + # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence] The cadence to bill for this price on. + # + # @param event_output_config [Orb::Models::SubscriptionCreateParams::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::SubscriptionCreateParams::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::SubscriptionCreateParams::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::SubscriptionCreateParams::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::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput)] + end + end + + # @deprecated + module ExternalMarketplace + extend Orb::Internal::Type::Enum + + GOOGLE = :google + AWS = :aws + AZURE = :azure + + # @!method self.values + # @return [Array] + end + + class RemoveAdjustment < Orb::Internal::Type::BaseModel + # @!attribute adjustment_id + # The id of the adjustment to remove on the subscription. + # + # @return [String] + required :adjustment_id, String + + # @!method initialize(adjustment_id:) + # @param adjustment_id [String] The id of the adjustment to remove on the subscription. + end + + class RemovePrice < Orb::Internal::Type::BaseModel + # @!attribute external_price_id + # The external price id of the price to remove on the subscription. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute price_id + # The id of the price to remove on the subscription. + # + # @return [String, nil] + optional :price_id, String, nil?: true + + # @!method initialize(external_price_id: nil, price_id: nil) + # @param external_price_id [String, nil] The external price id of the price to remove on the subscription. + # + # @param price_id [String, nil] The id of the price to remove on the subscription. + end + + class ReplaceAdjustment < Orb::Internal::Type::BaseModel + # @!attribute adjustment + # The definition of a new adjustment to create and add to the subscription. + # + # @return [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum] + required :adjustment, union: -> { Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment } + + # @!attribute replaces_adjustment_id + # The id of the adjustment on the plan to replace in the subscription. + # + # @return [String] + required :replaces_adjustment_id, String + + # @!method initialize(adjustment:, replaces_adjustment_id:) + # @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 subscription. + # + # @param replaces_adjustment_id [String] The id of the adjustment on the plan to replace in the subscription. + + # The definition of a new adjustment to create and add to the subscription. + # + # @see Orb::Models::SubscriptionCreateParams::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 + # @!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 subscription. + # + # @return [String] + required :replaces_price_id, String + + # @!attribute allocation_price + # The definition of a new allocation price to create and add to the subscription. + # + # @return [Orb::Models::NewAllocationPrice, nil] + optional :allocation_price, -> { Orb::NewAllocationPrice }, nil?: true + + # @!attribute discounts + # @deprecated + # + # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the + # replacement price. + # + # @return [Array, nil] + optional :discounts, -> { Orb::Internal::Type::ArrayOf[Orb::DiscountOverride] }, nil?: true + + # @!attribute external_price_id + # The external price id of the price to add to the subscription. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # The new quantity of the price, if the price is a fixed price. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute maximum_amount + # @deprecated + # + # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for + # the replacement price. + # + # @return [String, nil] + optional :maximum_amount, String, nil?: true + + # @!attribute metric_parameter_overrides + # Override values for parameterized billable metric variables. Keys are parameter + # names, values are the override values. + # + # @return [Hash{Symbol=>Object}, nil] + optional :metric_parameter_overrides, + Orb::Internal::Type::HashOf[Orb::Internal::Type::Unknown], + nil?: true + + # @!attribute minimum_amount + # @deprecated + # + # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for + # the replacement price. + # + # @return [String, nil] + optional :minimum_amount, String, nil?: true + + # @!attribute price + # New subscription price request body params. + # + # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput, nil] + optional :price, union: -> { Orb::SubscriptionCreateParams::ReplacePrice::Price }, nil?: true + + # @!attribute price_id + # The id of the price to add to the subscription. + # + # @return [String, nil] + optional :price_id, String, nil?: true + + # @!method initialize(replaces_price_id:, allocation_price: nil, discounts: nil, external_price_id: nil, fixed_price_quantity: nil, maximum_amount: nil, metric_parameter_overrides: nil, minimum_amount: nil, price: nil, price_id: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionCreateParams::ReplacePrice} for more details. + # + # @param replaces_price_id [String] The id of the price on the plan to replace in the subscription. + # + # @param allocation_price [Orb::Models::NewAllocationPrice, nil] The definition of a new allocation price to create and add to the subscription. + # + # @param discounts [Array, nil] [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the r + # + # @param external_price_id [String, nil] The external price id of the price to add to the subscription. + # + # @param fixed_price_quantity [Float, nil] The new quantity of the price, if the price is a fixed price. + # + # @param maximum_amount [String, nil] [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for + # + # @param metric_parameter_overrides [Hash{Symbol=>Object}, nil] Override values for parameterized billable metric variables. Keys are parameter + # + # @param minimum_amount [String, nil] [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for + # + # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput, nil] New subscription price request body params. + # + # @param price_id [String, nil] The id of the price to add to the subscription. + + # New subscription price request body params. + # + # @see Orb::Models::SubscriptionCreateParams::ReplacePrice#price + module Price + extend Orb::Internal::Type::Union + + discriminator :model_type + + variant :unit, -> { Orb::NewSubscriptionUnitPrice } + + variant :tiered, -> { Orb::NewSubscriptionTieredPrice } + + variant :bulk, -> { Orb::NewSubscriptionBulkPrice } + + variant :bulk_with_filters, -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters } + + variant :package, -> { Orb::NewSubscriptionPackagePrice } + + variant :matrix, -> { Orb::NewSubscriptionMatrixPrice } + + variant :threshold_total_amount, -> { Orb::NewSubscriptionThresholdTotalAmountPrice } + + variant :tiered_package, -> { Orb::NewSubscriptionTieredPackagePrice } + + variant :tiered_with_minimum, -> { Orb::NewSubscriptionTieredWithMinimumPrice } + + variant :grouped_tiered, -> { Orb::NewSubscriptionGroupedTieredPrice } + + variant :tiered_package_with_minimum, -> { Orb::NewSubscriptionTieredPackageWithMinimumPrice } + + variant :package_with_allocation, -> { Orb::NewSubscriptionPackageWithAllocationPrice } + + variant :unit_with_percent, -> { Orb::NewSubscriptionUnitWithPercentPrice } + + variant :matrix_with_allocation, -> { Orb::NewSubscriptionMatrixWithAllocationPrice } + + variant :matrix_with_threshold_discounts, + -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts } + + variant :tiered_with_proration, + -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration } + + variant :unit_with_proration, -> { Orb::NewSubscriptionUnitWithProrationPrice } + + variant :grouped_allocation, -> { Orb::NewSubscriptionGroupedAllocationPrice } + + variant :bulk_with_proration, -> { Orb::NewSubscriptionBulkWithProrationPrice } + + variant :grouped_with_prorated_minimum, -> { Orb::NewSubscriptionGroupedWithProratedMinimumPrice } + + variant :grouped_with_metered_minimum, -> { Orb::NewSubscriptionGroupedWithMeteredMinimumPrice } + + variant :grouped_with_min_max_thresholds, + -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds } + + variant :matrix_with_display_name, -> { Orb::NewSubscriptionMatrixWithDisplayNamePrice } + + variant :grouped_tiered_package, -> { Orb::NewSubscriptionGroupedTieredPackagePrice } + + variant :max_group_tiered_package, -> { Orb::NewSubscriptionMaxGroupTieredPackagePrice } + + variant :scalable_matrix_with_unit_pricing, -> { Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice } + + variant :scalable_matrix_with_tiered_pricing, + -> { Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice } + + variant :cumulative_grouped_bulk, -> { Orb::NewSubscriptionCumulativeGroupedBulkPrice } + + variant :cumulative_grouped_allocation, + -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation } + + variant :daily_credit_allowance, + -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance } + + variant :metered_allowance, -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance } + + variant :minimum_composite, -> { Orb::NewSubscriptionMinimumCompositePrice } + + variant :percent, -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent } + + variant :event_output, -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput } + + class BulkWithFilters < Orb::Internal::Type::BaseModel + # @!attribute bulk_with_filters_config + # Configuration for bulk_with_filters pricing + # + # @return [Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig] + required :bulk_with_filters_config, + -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig } + + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence] + required :cadence, + enum: -> { Orb::SubscriptionCreateParams::ReplacePrice::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::SubscriptionCreateParams::ReplacePrice::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::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters} + # for more details. + # + # @param bulk_with_filters_config [Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing + # + # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::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::SubscriptionCreateParams::ReplacePrice::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::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter] } + + # @!attribute tiers + # Bulk tiers for rating based on total usage volume + # + # @return [Array] + required :tiers, + -> { Orb::Internal::Type::ArrayOf[Orb::SubscriptionCreateParams::ReplacePrice::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::SubscriptionCreateParams::ReplacePrice::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 MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence] + required :cadence, + enum: -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute matrix_with_threshold_discounts_config + # Configuration for matrix_with_threshold_discounts pricing + # + # @return [Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] + required :matrix_with_threshold_discounts_config, + -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :matrix_with_threshold_discounts] + required :model_type, const: :matrix_with_threshold_discounts + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_threshold_discounts) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts} + # for more details. + # + # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param matrix_with_threshold_discounts_config [Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type - class ReplacePrice < Orb::Internal::Type::BaseModel - # @!attribute replaces_price_id - # The id of the price on the plan to replace in the subscription. - # - # @return [String] - required :replaces_price_id, String + # The cadence to bill for this price on. + # + # @see Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts#cadence + module Cadence + extend Orb::Internal::Type::Enum - # @!attribute allocation_price - # The definition of a new allocation price to create and add to the subscription. - # - # @return [Orb::Models::NewAllocationPrice, nil] - optional :allocation_price, -> { Orb::NewAllocationPrice }, nil?: true + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom - # @!attribute discounts - # @deprecated - # - # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the - # replacement price. - # - # @return [Array, nil] - optional :discounts, -> { Orb::Internal::Type::ArrayOf[Orb::DiscountOverride] }, nil?: true + # @!method self.values + # @return [Array] + end - # @!attribute external_price_id - # The external price id of the price to add to the subscription. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true + # @see Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + # @!attribute default_unit_amount + # Unit price used for usage that does not match any defined matrix cell. + # + # @return [String] + required :default_unit_amount, String - # @!attribute fixed_price_quantity - # The new quantity of the price, if the price is a fixed price. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true + # @!attribute first_dimension + # First matrix dimension key. + # + # @return [String] + required :first_dimension, String - # @!attribute maximum_amount - # @deprecated - # - # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for - # the replacement price. - # - # @return [String, nil] - optional :maximum_amount, String, nil?: true + # @!attribute matrix_values + # Per-cell unit prices. + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + end + + # @!attribute second_dimension + # Optional second matrix dimension key. + # + # @return [String, nil] + optional :second_dimension, String, nil?: true - # @!attribute metric_parameter_overrides - # Override values for parameterized billable metric variables. Keys are parameter - # names, values are the override values. - # - # @return [Hash{Symbol=>Object}, nil] - optional :metric_parameter_overrides, - Orb::Internal::Type::HashOf[Orb::Internal::Type::Unknown], - nil?: true + # @!attribute threshold_discount_groups + # + # @return [Array, nil] + optional :threshold_discount_groups, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + end + + # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil) + # Configuration for matrix_with_threshold_discounts pricing + # + # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell. + # + # @param first_dimension [String] First matrix dimension key. + # + # @param matrix_values [Array] Per-cell unit prices. + # + # @param second_dimension [String, nil] Optional second matrix dimension key. + # + # @param threshold_discount_groups [Array] - # @!attribute minimum_amount - # @deprecated - # - # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for - # the replacement price. - # - # @return [String, nil] - optional :minimum_amount, String, nil?: true + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute first_dimension_value + # + # @return [String] + required :first_dimension_value, String - # @!attribute price - # New subscription price request body params. - # - # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput, nil] - optional :price, union: -> { Orb::SubscriptionCreateParams::ReplacePrice::Price }, nil?: true + # @!attribute unit_amount + # + # @return [String] + required :unit_amount, String - # @!attribute price_id - # The id of the price to add to the subscription. - # - # @return [String, nil] - optional :price_id, String, nil?: true + # @!attribute second_dimension_value + # + # @return [String, nil] + optional :second_dimension_value, String, nil?: true - # @!method initialize(replaces_price_id:, allocation_price: nil, discounts: nil, external_price_id: nil, fixed_price_quantity: nil, maximum_amount: nil, metric_parameter_overrides: nil, minimum_amount: nil, price: nil, price_id: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::SubscriptionCreateParams::ReplacePrice} for more details. - # - # @param replaces_price_id [String] The id of the price on the plan to replace in the subscription. - # - # @param allocation_price [Orb::Models::NewAllocationPrice, nil] The definition of a new allocation price to create and add to the subscription. - # - # @param discounts [Array, nil] [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the r - # - # @param external_price_id [String, nil] The external price id of the price to add to the subscription. - # - # @param fixed_price_quantity [Float, nil] The new quantity of the price, if the price is a fixed price. - # - # @param maximum_amount [String, nil] [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for - # - # @param metric_parameter_overrides [Hash{Symbol=>Object}, nil] Override values for parameterized billable metric variables. Keys are parameter - # - # @param minimum_amount [String, nil] [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for - # - # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput, nil] New subscription price request body params. - # - # @param price_id [String, nil] The id of the price to add to the subscription. + # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil) + # @param first_dimension_value [String] + # @param unit_amount [String] + # @param second_dimension_value [String, nil] + end - # New subscription price request body params. - # - # @see Orb::Models::SubscriptionCreateParams::ReplacePrice#price - module Price - extend Orb::Internal::Type::Union + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + # @!attribute above_threshold_discount_percentage + # Discount rate applied to spend above the threshold. + # + # @return [String] + required :above_threshold_discount_percentage, String - discriminator :model_type + # @!attribute below_threshold_discount_percentage + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + # + # @return [String] + required :below_threshold_discount_percentage, String - variant :unit, -> { Orb::NewSubscriptionUnitPrice } + # @!attribute cell_coordinates + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + # + # @return [String] + required :cell_coordinates, String - variant :tiered, -> { Orb::NewSubscriptionTieredPrice } + # @!attribute threshold_amount + # + # @return [String] + required :threshold_amount, String - variant :bulk, -> { Orb::NewSubscriptionBulkPrice } + # @!attribute description + # + # @return [String, nil] + optional :description, String, nil?: true - variant :bulk_with_filters, -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters } + # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup} + # for more details. + # + # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold. + # + # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli + # + # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # + # @param threshold_amount [String] + # + # @param description [String, nil] + end + end + end - variant :package, -> { Orb::NewSubscriptionPackagePrice } + class TieredWithProration < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence] + required :cadence, + enum: -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence } - variant :matrix, -> { Orb::NewSubscriptionMatrixPrice } + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String - variant :threshold_total_amount, -> { Orb::NewSubscriptionThresholdTotalAmountPrice } + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :tiered_with_proration] + required :model_type, const: :tiered_with_proration - variant :tiered_package, -> { Orb::NewSubscriptionTieredPackagePrice } + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String - variant :tiered_with_minimum, -> { Orb::NewSubscriptionTieredWithMinimumPrice } + # @!attribute tiered_with_proration_config + # Configuration for tiered_with_proration pricing + # + # @return [Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig] + required :tiered_with_proration_config, + -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig } - variant :grouped_tiered, -> { Orb::NewSubscriptionGroupedTieredPrice } + # @!attribute billable_metric_id + # The id of 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 :tiered_package_with_minimum, -> { Orb::NewSubscriptionTieredPackageWithMinimumPrice } + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance 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 :package_with_allocation, -> { Orb::NewSubscriptionPackageWithAllocationPrice } + # @!attribute billing_cycle_configuration + # For custom cadence: 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 :unit_with_percent, -> { Orb::NewSubscriptionUnitWithPercentPrice } + # @!attribute 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_with_allocation, -> { Orb::NewSubscriptionMatrixWithAllocationPrice } + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::ConversionRateConfig + }, + nil?: true - variant :tiered_with_proration, - -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration } + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true - variant :unit_with_proration, -> { Orb::NewSubscriptionUnitWithProrationPrice } + # @!attribute dimensional_price_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 :grouped_allocation, -> { Orb::NewSubscriptionGroupedAllocationPrice } + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true - variant :bulk_with_proration, -> { Orb::NewSubscriptionBulkWithProrationPrice } + # @!attribute fixed_price_quantity + # 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_with_prorated_minimum, -> { Orb::NewSubscriptionGroupedWithProratedMinimumPrice } + # @!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 :grouped_with_metered_minimum, -> { Orb::NewSubscriptionGroupedWithMeteredMinimumPrice } + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are 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 :grouped_with_min_max_thresholds, - -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds } + # @!attribute 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 :matrix_with_display_name, -> { Orb::NewSubscriptionMatrixWithDisplayNamePrice } + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can 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 :grouped_tiered_package, -> { Orb::NewSubscriptionGroupedTieredPackagePrice } + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true - variant :max_group_tiered_package, -> { Orb::NewSubscriptionMaxGroupTieredPackagePrice } + # @!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::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration} + # for more details. + # + # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::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::SubscriptionCreateParams::ReplacePrice::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 - variant :scalable_matrix_with_unit_pricing, -> { Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice } + # The cadence to bill for this price on. + # + # @see Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration#cadence + module Cadence + extend Orb::Internal::Type::Enum - variant :scalable_matrix_with_tiered_pricing, - -> { Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice } + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom - variant :cumulative_grouped_bulk, -> { Orb::NewSubscriptionCumulativeGroupedBulkPrice } + # @!method self.values + # @return [Array] + end - variant :cumulative_grouped_allocation, - -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation } + # @see Orb::Models::SubscriptionCreateParams::ReplacePrice::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::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] } - variant :minimum_composite, -> { Orb::NewSubscriptionMinimumCompositePrice } + # @!method initialize(tiers:) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionCreateParams::ReplacePrice::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 - variant :percent, -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent } + class Tier < Orb::Internal::Type::BaseModel + # @!attribute tier_lower_bound + # Inclusive tier starting value + # + # @return [String] + required :tier_lower_bound, String - variant :event_output, -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput } + # @!attribute unit_amount + # Amount per unit + # + # @return [String] + required :unit_amount, String - class BulkWithFilters < Orb::Internal::Type::BaseModel - # @!attribute bulk_with_filters_config - # Configuration for bulk_with_filters pricing - # - # @return [Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig] - required :bulk_with_filters_config, - -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig } + # @!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::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence] + # @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence] required :cadence, - enum: -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence } + enum: -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence } + + # @!attribute grouped_with_min_max_thresholds_config + # Configuration for grouped_with_min_max_thresholds pricing + # + # @return [Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] + required :grouped_with_min_max_thresholds_config, + -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } # @!attribute item_id # The id of the item the price will be associated with. @@ -2248,8 +3938,8 @@ class BulkWithFilters < Orb::Internal::Type::BaseModel # @!attribute model_type # The pricing model type # - # @return [Symbol, :bulk_with_filters] - required :model_type, const: :bulk_with_filters + # @return [Symbol, :grouped_with_min_max_thresholds] + required :model_type, const: :grouped_with_min_max_thresholds # @!attribute name # The name of the price. @@ -2290,7 +3980,7 @@ class BulkWithFilters < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::ConversionRateConfig + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::ConversionRateConfig }, nil?: true @@ -2358,14 +4048,14 @@ 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:, 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::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters} + # {Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds} # for more details. # - # @param bulk_with_filters_config [Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing + # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. # - # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence] The cadence to bill for this price on. + # @param grouped_with_min_max_thresholds_config [Orb::Models::SubscriptionCreateParams::ReplacePrice::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. # @@ -2392,84 +4082,18 @@ class BulkWithFilters < Orb::Internal::Type::BaseModel # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice # # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. - # - # @param license_type_id [String, nil] The ID of the license type to associate with this price. - # - # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be 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::SubscriptionCreateParams::ReplacePrice::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::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter] } - - # @!attribute tiers - # Bulk tiers for rating based on total usage volume - # - # @return [Array] - required :tiers, - -> { Orb::Internal::Type::ArrayOf[Orb::SubscriptionCreateParams::ReplacePrice::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 license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be 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::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters#cadence + # @see Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds#cadence module Cadence extend Orb::Internal::Type::Enum @@ -2483,15 +4107,60 @@ module Cadence # @!method self.values # @return [Array] end + + # @see Orb::Models::SubscriptionCreateParams::ReplacePrice::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 TieredWithProration < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence] + # @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence] required :cadence, - enum: -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence } + enum: -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence } + + # @!attribute cumulative_grouped_allocation_config + # Configuration for cumulative_grouped_allocation pricing + # + # @return [Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] + required :cumulative_grouped_allocation_config, + -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig } # @!attribute item_id # The id of the item the price will be associated with. @@ -2502,8 +4171,8 @@ class TieredWithProration < Orb::Internal::Type::BaseModel # @!attribute model_type # The pricing model type # - # @return [Symbol, :tiered_with_proration] - required :model_type, const: :tiered_with_proration + # @return [Symbol, :cumulative_grouped_allocation] + required :model_type, const: :cumulative_grouped_allocation # @!attribute name # The name of the price. @@ -2511,13 +4180,6 @@ class TieredWithProration < Orb::Internal::Type::BaseModel # @return [String] required :name, String - # @!attribute tiered_with_proration_config - # Configuration for tiered_with_proration pricing - # - # @return [Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig] - required :tiered_with_proration_config, - -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig } - # @!attribute billable_metric_id # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -2551,7 +4213,7 @@ class TieredWithProration < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::ConversionRateConfig + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::ConversionRateConfig }, nil?: true @@ -2619,19 +4281,19 @@ 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:, 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::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration} + # {Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation} # for more details. # - # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on. + # + # @param cumulative_grouped_allocation_config [Orb::Models::SubscriptionCreateParams::ReplacePrice::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 tiered_with_proration_config [Orb::Models::SubscriptionCreateParams::ReplacePrice::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 @@ -2660,11 +4322,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, :cumulative_grouped_allocation] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration#cadence + # @see Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation#cadence module Cadence extend Orb::Internal::Type::Enum @@ -2679,62 +4341,59 @@ module Cadence # @return [Array] end - # @see Orb::Models::SubscriptionCreateParams::ReplacePrice::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 + # @see Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation#cumulative_grouped_allocation_config + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + # @!attribute cumulative_allocation + # The overall allocation across all groups # - # @return [Array] - required :tiers, - -> { Orb::Internal::Type::ArrayOf[Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] } + # @return [String] + required :cumulative_allocation, String - # @!method initialize(tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig} - # for more details. - # - # Configuration for tiered_with_proration pricing + # @!attribute group_allocation + # The allocation per individual group # - # @param tiers [Array] Tiers for rating based on total usage quantities into the specified tier with pr + # @return [String] + required :group_allocation, String - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # Inclusive tier starting value - # - # @return [String] - required :tier_lower_bound, String + # @!attribute grouping_key + # The event property used to group usage before applying allocations + # + # @return [String] + required :grouping_key, String - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String + # @!attribute unit_amount + # The amount to charge for each unit outside of the allocation + # + # @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 + # @!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 GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence] + # @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence] required :cadence, - enum: -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence } + enum: -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence } - # @!attribute grouped_with_min_max_thresholds_config - # Configuration for grouped_with_min_max_thresholds pricing + # @!attribute daily_credit_allowance_config + # Configuration for daily_credit_allowance pricing # - # @return [Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] - required :grouped_with_min_max_thresholds_config, - -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } + # @return [Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] + required :daily_credit_allowance_config, + -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig } # @!attribute item_id # The id of the item the price will be associated with. @@ -2745,8 +4404,8 @@ class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @!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, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance # @!attribute name # The name of the price. @@ -2787,7 +4446,7 @@ class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::ConversionRateConfig + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::ConversionRateConfig }, nil?: true @@ -2855,14 +4514,14 @@ 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(cadence:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :daily_credit_allowance) # Some parameter documentations has been truncated, see - # {Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds} + # {Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance} # for more details. # - # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence] The cadence to bill for this price on. # - # @param grouped_with_min_max_thresholds_config [Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing + # @param daily_credit_allowance_config [Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing # # @param item_id [String] The id of the item the price will be associated with. # @@ -2896,11 +4555,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, :daily_credit_allowance] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds#cadence + # @see Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance#cadence module Cadence extend Orb::Internal::Type::Enum @@ -2915,59 +4574,99 @@ module Cadence # @return [Array] end - # @see Orb::Models::SubscriptionCreateParams::ReplacePrice::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 + # @see Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance#daily_credit_allowance_config + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute daily_allowance + # Credits granted per day. Lose-it-or-use-it; does not roll over. # # @return [String] - required :grouping_key, String + required :daily_allowance, String - # @!attribute maximum_charge - # The maximum amount to charge each group + # @!attribute default_unit_amount + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value # # @return [String] - required :maximum_charge, String + required :default_unit_amount, String - # @!attribute minimum_charge - # The minimum amount to charge each group, regardless of usage + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by # - # @return [String] - required :minimum_charge, String + # @return [Array] + required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true] - # @!attribute per_unit_rate - # The base price charged per group + # @!attribute event_day_property + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. # # @return [String] - required :per_unit_rate, String + required :event_day_property, String - # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:) - # Configuration for grouped_with_min_max_thresholds pricing + # @!attribute matrix_values + # Per-dimension credit rates # - # @param grouping_key [String] The event property used to group before applying thresholds + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + end + + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig} + # for more details. # - # @param maximum_charge [String] The maximum amount to charge each group + # Configuration for daily_credit_allowance pricing # - # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage + # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over. # - # @param per_unit_rate [String] The base price charged per group + # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified + # matrix\_ + # + # @param dimensions [Array] One or two event property values to evaluate matrix groups by + # + # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g. + # + # @param matrix_values [Array] Per-dimension credit rates + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + # + # @return [Array] + required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Credits charged per unit of usage matching the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!method initialize(dimension_values:, unit_amount:) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue} + # for more details. + # + # Per-dimension credit price for the daily credit allowance model. + # + # @param dimension_values [Array] One or two matrix keys to filter usage to this value by. For example, ["model"] + # + # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values + end end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence] + # @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::Cadence] required :cadence, - enum: -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence } - - # @!attribute cumulative_grouped_allocation_config - # Configuration for cumulative_grouped_allocation pricing - # - # @return [Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] - required :cumulative_grouped_allocation_config, - -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig } + enum: -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -2975,11 +4674,18 @@ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing + # + # @return [Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, + -> { Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig } + # @!attribute model_type # The pricing model type # - # @return [Symbol, :cumulative_grouped_allocation] - required :model_type, const: :cumulative_grouped_allocation + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance # @!attribute name # The name of the price. @@ -3020,7 +4726,7 @@ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::ConversionRateConfig + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::ConversionRateConfig }, nil?: true @@ -3088,17 +4794,17 @@ 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:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :metered_allowance) # Some parameter documentations has been truncated, see - # {Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation} + # {Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance} # for more details. # - # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on. - # - # @param cumulative_grouped_allocation_config [Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing + # @param cadence [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # + # @param metered_allowance_config [Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing + # # @param name [String] The name of the price. # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b @@ -3129,11 +4835,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, :metered_allowance] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation#cadence + # @see Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance#cadence module Cadence extend Orb::Internal::Type::Enum @@ -3148,42 +4854,67 @@ module Cadence # @return [Array] end - # @see Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation#cumulative_grouped_allocation_config - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute cumulative_allocation - # The overall allocation across all groups + # @see Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance#metered_allowance_config + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute allowance_grouping_value + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. # # @return [String] - required :cumulative_allocation, String + required :allowance_grouping_value, String - # @!attribute group_allocation - # The allocation per individual group + # @!attribute consumption_grouping_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. # # @return [String] - required :group_allocation, String + required :consumption_grouping_value, String # @!attribute grouping_key - # The event property used to group usage before applying allocations + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. # # @return [String] required :grouping_key, String # @!attribute unit_amount - # The amount to charge for each unit outside of the allocation + # Per-unit price applied to gross consumption and to the allowance credit. # # @return [String] required :unit_amount, String - # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:) - # Configuration for cumulative_grouped_allocation pricing + # @!attribute allowance_display_name + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). # - # @param cumulative_allocation [String] The overall allocation across all groups + # @return [String, nil] + optional :allowance_display_name, String + + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). # - # @param group_allocation [String] The allocation per individual group + # @return [String, nil] + optional :consumption_display_name, String + + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig} + # for more details. # - # @param grouping_key [String] The event property used to group usage before applying allocations + # Configuration for metered_allowance pricing # - # @param unit_amount [String] The amount to charge for each unit outside of the allocation + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p + # + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl + # + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant + # + # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit. + # + # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten'). end end @@ -3627,7 +5358,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::EventOutput)] end end end diff --git a/lib/orb/models/subscription_price_intervals_params.rb b/lib/orb/models/subscription_price_intervals_params.rb index 5368b82f..d638fdbe 100644 --- a/lib/orb/models/subscription_price_intervals_params.rb +++ b/lib/orb/models/subscription_price_intervals_params.rb @@ -163,7 +163,7 @@ class Add < Orb::Internal::Type::BaseModel # @!attribute price # New floating price request body params. # - # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput, nil] + # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput, nil] optional :price, union: -> { Orb::SubscriptionPriceIntervalsParams::Add::Price }, nil?: true # @!attribute price_id @@ -209,7 +209,7 @@ class Add < Orb::Internal::Type::BaseModel # # @param minimum_amount [Float, nil] The minimum amount that will be billed for this price interval for a given billi # - # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput, nil] New floating price request body params. + # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput, nil] New floating price request body params. # # @param price_id [String, nil] The id of the price to add to the subscription. # @@ -379,6 +379,9 @@ module Price variant :matrix_with_allocation, -> { Orb::NewFloatingMatrixWithAllocationPrice } + variant :matrix_with_threshold_discounts, + -> { Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts } + variant :tiered_with_proration, -> { Orb::NewFloatingTieredWithProrationPrice } variant :unit_with_proration, -> { Orb::NewFloatingUnitWithProrationPrice } @@ -409,6 +412,11 @@ module Price variant :cumulative_grouped_allocation, -> { Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation } + variant :daily_credit_allowance, + -> { Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance } + + variant :metered_allowance, -> { Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance } + variant :minimum_composite, -> { Orb::NewFloatingMinimumCompositePrice } variant :percent, -> { Orb::SubscriptionPriceIntervalsParams::Add::Price::Percent } @@ -666,6 +674,316 @@ module Cadence end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::Cadence] + required :cadence, + enum: -> { Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute matrix_with_threshold_discounts_config + # Configuration for matrix_with_threshold_discounts pricing + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] + required :matrix_with_threshold_discounts_config, + -> { Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :matrix_with_threshold_discounts] + required :model_type, const: :matrix_with_threshold_discounts + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::ConversionRateConfig + }, + nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!method initialize(cadence:, currency:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :matrix_with_threshold_discounts) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts} + # for more details. + # + # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on. + # + # @param currency [String] An ISO 4217 currency string for which this price is billed in. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param matrix_with_threshold_discounts_config [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + # @!attribute default_unit_amount + # Unit price used for usage that does not match any defined matrix cell. + # + # @return [String] + required :default_unit_amount, String + + # @!attribute first_dimension + # First matrix dimension key. + # + # @return [String] + required :first_dimension, String + + # @!attribute matrix_values + # Per-cell unit prices. + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + end + + # @!attribute second_dimension + # Optional second matrix dimension key. + # + # @return [String, nil] + optional :second_dimension, String, nil?: true + + # @!attribute threshold_discount_groups + # + # @return [Array, nil] + optional :threshold_discount_groups, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + end + + # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil) + # Configuration for matrix_with_threshold_discounts pricing + # + # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell. + # + # @param first_dimension [String] First matrix dimension key. + # + # @param matrix_values [Array] Per-cell unit prices. + # + # @param second_dimension [String, nil] Optional second matrix dimension key. + # + # @param threshold_discount_groups [Array] + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute first_dimension_value + # + # @return [String] + required :first_dimension_value, String + + # @!attribute unit_amount + # + # @return [String] + required :unit_amount, String + + # @!attribute second_dimension_value + # + # @return [String, nil] + optional :second_dimension_value, String, nil?: true + + # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil) + # @param first_dimension_value [String] + # @param unit_amount [String] + # @param second_dimension_value [String, nil] + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + # @!attribute above_threshold_discount_percentage + # Discount rate applied to spend above the threshold. + # + # @return [String] + required :above_threshold_discount_percentage, String + + # @!attribute below_threshold_discount_percentage + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + # + # @return [String] + required :below_threshold_discount_percentage, String + + # @!attribute cell_coordinates + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + # + # @return [String] + required :cell_coordinates, String + + # @!attribute threshold_amount + # + # @return [String] + required :threshold_amount, String + + # @!attribute description + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup} + # for more details. + # + # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold. + # + # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli + # + # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # + # @param threshold_amount [String] + # + # @param description [String, nil] + end + end + end + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -1112,6 +1430,524 @@ class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel end end + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence] + required :cadence, + enum: -> { Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute daily_credit_allowance_config + # Configuration for daily_credit_allowance pricing + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] + required :daily_credit_allowance_config, + -> { Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!method initialize(cadence:, currency:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :daily_credit_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance} + # for more details. + # + # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence] The cadence to bill for this price on. + # + # @param currency [String] An ISO 4217 currency string for which this price is billed in. + # + # @param daily_credit_allowance_config [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param model_type [Symbol, :daily_credit_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance#daily_credit_allowance_config + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute daily_allowance + # Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @return [String] + required :daily_allowance, String + + # @!attribute default_unit_amount + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + # + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute event_day_property + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + # + # @return [String] + required :event_day_property, String + + # @!attribute matrix_values + # Per-dimension credit rates + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + end + + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig} + # for more details. + # + # Configuration for daily_credit_allowance pricing + # + # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified + # matrix\_ + # + # @param dimensions [Array] One or two event property values to evaluate matrix groups by + # + # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g. + # + # @param matrix_values [Array] Per-dimension credit rates + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + # + # @return [Array] + required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Credits charged per unit of usage matching the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!method initialize(dimension_values:, unit_amount:) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue} + # for more details. + # + # Per-dimension credit price for the daily credit allowance model. + # + # @param dimension_values [Array] One or two matrix keys to filter usage to this value by. For example, ["model"] + # + # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values + end + end + end + + class MeteredAllowance < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence] + required :cadence, + enum: -> { Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence } + + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing + # + # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, + -> { Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::ConversionRateConfig + }, + nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!method initialize(cadence:, currency:, item_id:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :metered_allowance) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance} + # for more details. + # + # @param cadence [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence] The cadence to bill for this price on. + # + # @param currency [String] An ISO 4217 currency string for which this price is billed in. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param metered_allowance_config [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param model_type [Symbol, :metered_allowance] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance#metered_allowance_config + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute allowance_grouping_value + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + # + # @return [String] + required :allowance_grouping_value, String + + # @!attribute consumption_grouping_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + # + # @return [String] + required :consumption_grouping_value, String + + # @!attribute grouping_key + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + # + # @return [String] + required :grouping_key, String + + # @!attribute unit_amount + # Per-unit price applied to gross consumption and to the allowance credit. + # + # @return [String] + required :unit_amount, String + + # @!attribute allowance_display_name + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @return [String, nil] + optional :allowance_display_name, String + + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + # + # @return [String, nil] + optional :consumption_display_name, String + + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig} + # for more details. + # + # Configuration for metered_allowance pricing + # + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p + # + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl + # + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant + # + # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit. + # + # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + end + end + class Percent < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -1531,7 +2367,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput)] + # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::EventOutput)] end end diff --git a/lib/orb/models/subscription_schedule_plan_change_params.rb b/lib/orb/models/subscription_schedule_plan_change_params.rb index 1a7ac6c1..64faabc9 100644 --- a/lib/orb/models/subscription_schedule_plan_change_params.rb +++ b/lib/orb/models/subscription_schedule_plan_change_params.rb @@ -421,7 +421,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # @!attribute price # New subscription price request body params. # - # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, nil] + # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, nil] optional :price, union: -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price }, nil?: true # @!attribute price_id @@ -458,7 +458,7 @@ class AddPrice < Orb::Internal::Type::BaseModel # # @param plan_phase_order [Integer, nil] The phase to add this price to. # - # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, nil] New subscription price request body params. + # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, nil] New subscription price request body params. # # @param price_id [String, nil] The id of the price to add to the subscription. # @@ -501,6 +501,9 @@ module Price variant :matrix_with_allocation, -> { Orb::NewSubscriptionMatrixWithAllocationPrice } + variant :matrix_with_threshold_discounts, + -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts } + variant :tiered_with_proration, -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration } @@ -533,6 +536,12 @@ module Price variant :cumulative_grouped_allocation, -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation } + variant :daily_credit_allowance, + -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance } + + variant :metered_allowance, + -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance } + variant :minimum_composite, -> { Orb::NewSubscriptionMinimumCompositePrice } variant :percent, -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent } @@ -800,6 +809,326 @@ module Cadence end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence] + required :cadence, + enum: -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute matrix_with_threshold_discounts_config + # Configuration for matrix_with_threshold_discounts pricing + # + # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] + required :matrix_with_threshold_discounts_config, + -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :matrix_with_threshold_discounts] + required :model_type, const: :matrix_with_threshold_discounts + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_threshold_discounts) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts} + # for more details. + # + # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param matrix_with_threshold_discounts_config [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts#cadence + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + # @!attribute default_unit_amount + # Unit price used for usage that does not match any defined matrix cell. + # + # @return [String] + required :default_unit_amount, String + + # @!attribute first_dimension + # First matrix dimension key. + # + # @return [String] + required :first_dimension, String + + # @!attribute matrix_values + # Per-cell unit prices. + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + end + + # @!attribute second_dimension + # Optional second matrix dimension key. + # + # @return [String, nil] + optional :second_dimension, String, nil?: true + + # @!attribute threshold_discount_groups + # + # @return [Array, nil] + optional :threshold_discount_groups, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + end + + # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil) + # Configuration for matrix_with_threshold_discounts pricing + # + # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell. + # + # @param first_dimension [String] First matrix dimension key. + # + # @param matrix_values [Array] Per-cell unit prices. + # + # @param second_dimension [String, nil] Optional second matrix dimension key. + # + # @param threshold_discount_groups [Array] + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute first_dimension_value + # + # @return [String] + required :first_dimension_value, String + + # @!attribute unit_amount + # + # @return [String] + required :unit_amount, String + + # @!attribute second_dimension_value + # + # @return [String, nil] + optional :second_dimension_value, String, nil?: true + + # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil) + # @param first_dimension_value [String] + # @param unit_amount [String] + # @param second_dimension_value [String, nil] + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + # @!attribute above_threshold_discount_percentage + # Discount rate applied to spend above the threshold. + # + # @return [String] + required :above_threshold_discount_percentage, String + + # @!attribute below_threshold_discount_percentage + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + # + # @return [String] + required :below_threshold_discount_percentage, String + + # @!attribute cell_coordinates + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + # + # @return [String] + required :cell_coordinates, String + + # @!attribute threshold_amount + # + # @return [String] + required :threshold_amount, String + + # @!attribute description + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup} + # for more details. + # + # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold. + # + # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli + # + # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # + # @param threshold_amount [String] + # + # @param description [String, nil] + end + end + end + class TieredWithProration < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. @@ -1506,13 +1835,20 @@ class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel end end - class Percent < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence] + # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence] required :cadence, - enum: -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence } + enum: -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence } + + # @!attribute daily_credit_allowance_config + # Configuration for daily_credit_allowance pricing + # + # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] + required :daily_credit_allowance_config, + -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig } # @!attribute item_id # The id of the item the price will be associated with. @@ -1523,8 +1859,8 @@ class Percent < Orb::Internal::Type::BaseModel # @!attribute model_type # The pricing model type # - # @return [Symbol, :percent] - required :model_type, const: :percent + # @return [Symbol, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance # @!attribute name # The name of the price. @@ -1532,16 +1868,9 @@ class Percent < Orb::Internal::Type::BaseModel # @return [String] required :name, String - # @!attribute percent_config - # Configuration for percent pricing - # - # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig] - required :percent_config, - -> { Orb::SubscriptionSchedulePlanChangeParams::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. + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. # # @return [String, nil] optional :billable_metric_id, String, nil?: true @@ -1572,7 +1901,7 @@ class Percent < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::ConversionRateConfig + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::ConversionRateConfig }, nil?: true @@ -1640,19 +1969,19 @@ 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:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :daily_credit_allowance) # Some parameter documentations has been truncated, see - # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent} + # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance} # for more details. # - # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence] The cadence to bill for this price on. + # + # @param daily_credit_allowance_config [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing # # @param item_id [String] The id of the item the price will be associated with. # # @param name [String] The name of the price. # - # @param percent_config [Orb::Models::SubscriptionSchedulePlanChangeParams::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 @@ -1681,11 +2010,11 @@ class Percent < 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, :percent] The pricing model type + # @param model_type [Symbol, :daily_credit_allowance] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent#cadence + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1700,35 +2029,99 @@ module Cadence # @return [Array] end - # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent#percent_config - class PercentConfig < Orb::Internal::Type::BaseModel - # @!attribute percent - # What percent of the component subtotals to charge + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance#daily_credit_allowance_config + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute daily_allowance + # Credits granted per day. Lose-it-or-use-it; does not roll over. # - # @return [Float] - required :percent, Float + # @return [String] + required :daily_allowance, String - # @!method initialize(percent:) - # Configuration for percent pricing + # @!attribute default_unit_amount + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value # - # @param percent [Float] What percent of the component subtotals to charge + # @return [String] + required :default_unit_amount, String + + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by + # + # @return [Array] + required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute event_day_property + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + # + # @return [String] + required :event_day_property, String + + # @!attribute matrix_values + # Per-dimension credit rates + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + end + + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig} + # for more details. + # + # Configuration for daily_credit_allowance pricing + # + # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over. + # + # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified + # matrix\_ + # + # @param dimensions [Array] One or two event property values to evaluate matrix groups by + # + # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g. + # + # @param matrix_values [Array] Per-dimension credit rates + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + # + # @return [Array] + required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Credits charged per unit of usage matching the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!method initialize(dimension_values:, unit_amount:) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue} + # for more details. + # + # Per-dimension credit price for the daily credit allowance model. + # + # @param dimension_values [Array] One or two matrix keys to filter usage to this value by. For example, ["model"] + # + # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values + end end end - class EventOutput < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence] + # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence] required :cadence, - enum: -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence } - - # @!attribute event_output_config - # Configuration for event_output pricing - # - # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig] - required :event_output_config, - -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig } + enum: -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -1736,11 +2129,18 @@ class EventOutput < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing + # + # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, + -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig } + # @!attribute model_type # The pricing model type # - # @return [Symbol, :event_output] - required :model_type, const: :event_output + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance # @!attribute name # The name of the price. @@ -1781,7 +2181,7 @@ class EventOutput < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::ConversionRateConfig + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::ConversionRateConfig }, nil?: true @@ -1849,17 +2249,17 @@ 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:, item_id:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :metered_allowance) # Some parameter documentations has been truncated, see - # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput} + # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance} # for more details. # - # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence] The cadence to bill for this price on. - # - # @param event_output_config [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig] Configuration for event_output pricing + # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # + # @param metered_allowance_config [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing + # # @param name [String] The name of the price. # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b @@ -1890,11 +2290,11 @@ class EventOutput < 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, :event_output] The pricing model type + # @param model_type [Symbol, :metered_allowance] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput#cadence + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1909,326 +2309,1631 @@ module Cadence # @return [Array] end - # @see Orb::Models::SubscriptionSchedulePlanChangeParams::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. + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance#metered_allowance_config + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute allowance_grouping_value + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. # # @return [String] - required :unit_rating_key, String + required :allowance_grouping_value, 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. + # @!attribute consumption_grouping_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. # - # @return [String, nil] - optional :default_unit_rate, String, nil?: true + # @return [String] + required :consumption_grouping_value, String # @!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. + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + # + # @return [String] + required :grouping_key, String + + # @!attribute unit_amount + # Per-unit price applied to gross consumption and to the allowance credit. + # + # @return [String] + required :unit_amount, String + + # @!attribute allowance_display_name + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). # # @return [String, nil] - optional :grouping_key, String, nil?: true + optional :allowance_display_name, String - # @!method initialize(unit_rating_key:, default_unit_rate: nil, grouping_key: nil) + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + # + # @return [String, nil] + optional :consumption_display_name, String + + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) # Some parameter documentations has been truncated, see - # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig} + # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig} # for more details. # - # Configuration for event_output pricing + # Configuration for metered_allowance pricing # - # @param unit_rating_key [String] The key in the event data to extract the unit rate from. + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p # - # @param default_unit_rate [String, nil] If provided, this amount will be used as the unit rate when an event does not ha + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl # - # @param grouping_key [String, nil] An optional key in the event data to group by (e.g., event ID). All events will + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant + # + # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit. + # + # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten'). end end - # @!method self.variants - # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput)] - end - end - - # Reset billing periods to be aligned with the plan change's effective date or - # start of the month. Defaults to `unchanged` which keeps subscription's existing - # billing cycle alignment. - module BillingCycleAlignment - extend Orb::Internal::Type::Enum + class Percent < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence] + required :cadence, + enum: -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence } - UNCHANGED = :unchanged - PLAN_CHANGE_DATE = :plan_change_date - START_OF_MONTH = :start_of_month + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String - # @!method self.values - # @return [Array] - end + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :percent] + required :model_type, const: :percent - class RemoveAdjustment < Orb::Internal::Type::BaseModel - # @!attribute adjustment_id - # The id of the adjustment to remove on the subscription. - # - # @return [String] - required :adjustment_id, String + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String - # @!method initialize(adjustment_id:) - # @param adjustment_id [String] The id of the adjustment to remove on the subscription. - end + # @!attribute percent_config + # Configuration for percent pricing + # + # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig] + required :percent_config, + -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig } - class RemovePrice < Orb::Internal::Type::BaseModel - # @!attribute external_price_id - # The external price id of the price to remove on the subscription. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true - # @!attribute price_id - # The id of the price to remove on the subscription. - # - # @return [String, nil] - optional :price_id, String, nil?: true + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - # @!method initialize(external_price_id: nil, price_id: nil) - # @param external_price_id [String, nil] The external price id of the price to remove on the subscription. - # - # @param price_id [String, nil] The id of the price to remove on the subscription. - 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 ReplaceAdjustment < Orb::Internal::Type::BaseModel - # @!attribute adjustment - # The definition of a new adjustment to create and add to the subscription. - # - # @return [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum] - required :adjustment, - union: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment } + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true - # @!attribute replaces_adjustment_id - # The id of the adjustment on the plan to replace in the subscription. - # - # @return [String] - required :replaces_adjustment_id, String + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::ConversionRateConfig + }, + nil?: true - # @!method initialize(adjustment:, replaces_adjustment_id:) - # @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 subscription. - # - # @param replaces_adjustment_id [String] The id of the adjustment on the plan to replace in the subscription. + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true - # The definition of a new adjustment to create and add to the subscription. - # - # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment#adjustment - module Adjustment - extend Orb::Internal::Type::Union + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true - discriminator :adjustment_type + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used 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::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent} + # for more details. + # + # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence] + required :cadence, + enum: -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence } + + # @!attribute event_output_config + # Configuration for event_output pricing + # + # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig] + required :event_output_config, + -> { Orb::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput} + # for more details. + # + # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence] The cadence to bill for this price on. + # + # @param event_output_config [Orb::Models::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::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::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput)] + end + end + + # Reset billing periods to be aligned with the plan change's effective date or + # start of the month. Defaults to `unchanged` which keeps subscription's existing + # billing cycle alignment. + module BillingCycleAlignment + extend Orb::Internal::Type::Enum + + UNCHANGED = :unchanged + PLAN_CHANGE_DATE = :plan_change_date + START_OF_MONTH = :start_of_month + + # @!method self.values + # @return [Array] + end + + class RemoveAdjustment < Orb::Internal::Type::BaseModel + # @!attribute adjustment_id + # The id of the adjustment to remove on the subscription. + # + # @return [String] + required :adjustment_id, String + + # @!method initialize(adjustment_id:) + # @param adjustment_id [String] The id of the adjustment to remove on the subscription. + end + + class RemovePrice < Orb::Internal::Type::BaseModel + # @!attribute external_price_id + # The external price id of the price to remove on the subscription. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute price_id + # The id of the price to remove on the subscription. + # + # @return [String, nil] + optional :price_id, String, nil?: true + + # @!method initialize(external_price_id: nil, price_id: nil) + # @param external_price_id [String, nil] The external price id of the price to remove on the subscription. + # + # @param price_id [String, nil] The id of the price to remove on the subscription. + end + + class ReplaceAdjustment < Orb::Internal::Type::BaseModel + # @!attribute adjustment + # The definition of a new adjustment to create and add to the subscription. + # + # @return [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum] + required :adjustment, + union: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment } + + # @!attribute replaces_adjustment_id + # The id of the adjustment on the plan to replace in the subscription. + # + # @return [String] + required :replaces_adjustment_id, String + + # @!method initialize(adjustment:, replaces_adjustment_id:) + # @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 subscription. + # + # @param replaces_adjustment_id [String] The id of the adjustment on the plan to replace in the subscription. + + # The definition of a new adjustment to create and add to the subscription. + # + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::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 subscription. + # + # @return [String] + required :replaces_price_id, String + + # @!attribute allocation_price + # The definition of a new allocation price to create and add to the subscription. + # + # @return [Orb::Models::NewAllocationPrice, nil] + optional :allocation_price, -> { Orb::NewAllocationPrice }, nil?: true + + # @!attribute discounts + # @deprecated + # + # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the + # replacement price. + # + # @return [Array, nil] + optional :discounts, -> { Orb::Internal::Type::ArrayOf[Orb::DiscountOverride] }, nil?: true + + # @!attribute external_price_id + # The external price id of the price to add to the subscription. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # The new quantity of the price, if the price is a fixed price. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute maximum_amount + # @deprecated + # + # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for + # the replacement price. + # + # @return [String, nil] + optional :maximum_amount, String, nil?: true + + # @!attribute metric_parameter_overrides + # Override values for parameterized billable metric variables. Keys are parameter + # names, values are the override values. + # + # @return [Hash{Symbol=>Object}, nil] + optional :metric_parameter_overrides, + Orb::Internal::Type::HashOf[Orb::Internal::Type::Unknown], + nil?: true + + # @!attribute minimum_amount + # @deprecated + # + # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for + # the replacement price. + # + # @return [String, nil] + optional :minimum_amount, String, nil?: true + + # @!attribute price + # New subscription price request body params. + # + # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput, nil] + optional :price, + union: -> { + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price + }, + nil?: true + + # @!attribute price_id + # The id of the price to add to the subscription. + # + # @return [String, nil] + optional :price_id, String, nil?: true + + # @!method initialize(replaces_price_id:, allocation_price: nil, discounts: nil, external_price_id: nil, fixed_price_quantity: nil, maximum_amount: nil, metric_parameter_overrides: nil, minimum_amount: nil, price: nil, price_id: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice} for more + # details. + # + # @param replaces_price_id [String] The id of the price on the plan to replace in the subscription. + # + # @param allocation_price [Orb::Models::NewAllocationPrice, nil] The definition of a new allocation price to create and add to the subscription. + # + # @param discounts [Array, nil] [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the r + # + # @param external_price_id [String, nil] The external price id of the price to add to the subscription. + # + # @param fixed_price_quantity [Float, nil] The new quantity of the price, if the price is a fixed price. + # + # @param maximum_amount [String, nil] [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for + # + # @param metric_parameter_overrides [Hash{Symbol=>Object}, nil] Override values for parameterized billable metric variables. Keys are parameter + # + # @param minimum_amount [String, nil] [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for + # + # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput, nil] New subscription price request body params. + # + # @param price_id [String, nil] The id of the price to add to the subscription. + + # New subscription price request body params. + # + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice#price + module Price + extend Orb::Internal::Type::Union + + discriminator :model_type + + variant :unit, -> { Orb::NewSubscriptionUnitPrice } + + variant :tiered, -> { Orb::NewSubscriptionTieredPrice } + + variant :bulk, -> { Orb::NewSubscriptionBulkPrice } + + variant :bulk_with_filters, + -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters } + + variant :package, -> { Orb::NewSubscriptionPackagePrice } + + variant :matrix, -> { Orb::NewSubscriptionMatrixPrice } + + variant :threshold_total_amount, -> { Orb::NewSubscriptionThresholdTotalAmountPrice } + + variant :tiered_package, -> { Orb::NewSubscriptionTieredPackagePrice } + + variant :tiered_with_minimum, -> { Orb::NewSubscriptionTieredWithMinimumPrice } + + variant :grouped_tiered, -> { Orb::NewSubscriptionGroupedTieredPrice } + + variant :tiered_package_with_minimum, -> { Orb::NewSubscriptionTieredPackageWithMinimumPrice } + + variant :package_with_allocation, -> { Orb::NewSubscriptionPackageWithAllocationPrice } + + variant :unit_with_percent, -> { Orb::NewSubscriptionUnitWithPercentPrice } + + variant :matrix_with_allocation, -> { Orb::NewSubscriptionMatrixWithAllocationPrice } + + variant :matrix_with_threshold_discounts, + -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts } + + variant :tiered_with_proration, + -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration } + + variant :unit_with_proration, -> { Orb::NewSubscriptionUnitWithProrationPrice } + + variant :grouped_allocation, -> { Orb::NewSubscriptionGroupedAllocationPrice } + + variant :bulk_with_proration, -> { Orb::NewSubscriptionBulkWithProrationPrice } + + variant :grouped_with_prorated_minimum, -> { Orb::NewSubscriptionGroupedWithProratedMinimumPrice } + + variant :grouped_with_metered_minimum, -> { Orb::NewSubscriptionGroupedWithMeteredMinimumPrice } + + variant :grouped_with_min_max_thresholds, + -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds } + + variant :matrix_with_display_name, -> { Orb::NewSubscriptionMatrixWithDisplayNamePrice } + + variant :grouped_tiered_package, -> { Orb::NewSubscriptionGroupedTieredPackagePrice } + + variant :max_group_tiered_package, -> { Orb::NewSubscriptionMaxGroupTieredPackagePrice } + + variant :scalable_matrix_with_unit_pricing, -> { Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice } + + variant :scalable_matrix_with_tiered_pricing, + -> { Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice } + + variant :cumulative_grouped_bulk, -> { Orb::NewSubscriptionCumulativeGroupedBulkPrice } + + variant :cumulative_grouped_allocation, + -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation } + + variant :daily_credit_allowance, + -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance } + + variant :metered_allowance, + -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance } + + variant :minimum_composite, -> { Orb::NewSubscriptionMinimumCompositePrice } + + variant :percent, -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent } + + variant :event_output, -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput } + + class BulkWithFilters < Orb::Internal::Type::BaseModel + # @!attribute bulk_with_filters_config + # Configuration for bulk_with_filters pricing + # + # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig] + required :bulk_with_filters_config, + -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig } + + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence] + required :cadence, + enum: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::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::SubscriptionSchedulePlanChangeParams::ReplacePrice::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::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters} + # for more details. + # + # @param bulk_with_filters_config [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing + # + # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::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::SubscriptionSchedulePlanChangeParams::ReplacePrice::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::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ] + end - variant :percentage_discount, -> { Orb::NewPercentageDiscount } + # @!attribute tiers + # Bulk tiers for rating based on total usage volume + # + # @return [Array] + required :tiers, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + end - variant :usage_discount, -> { Orb::NewUsageDiscount } + # @!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 - variant :amount_discount, -> { Orb::NewAmountDiscount } + class Filter < Orb::Internal::Type::BaseModel + # @!attribute property_key + # Event property key to filter on + # + # @return [String] + required :property_key, String - variant :minimum, -> { Orb::NewMinimum } + # @!attribute property_value + # Event property value to match + # + # @return [String] + required :property_value, String - variant :maximum, -> { Orb::NewMaximum } + # @!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 - # @!method self.variants - # @return [Array(Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum)] - end - 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::SubscriptionSchedulePlanChangeParams::ReplacePrice::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 MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence] + required :cadence, + enum: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence } + + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String + + # @!attribute matrix_with_threshold_discounts_config + # Configuration for matrix_with_threshold_discounts pricing + # + # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] + required :matrix_with_threshold_discounts_config, + -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig } + + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :matrix_with_threshold_discounts] + required :model_type, const: :matrix_with_threshold_discounts + + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String + + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + # + # @return [String, nil] + optional :billable_metric_id, String, nil?: true + + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + # + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true + + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. + # + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true + + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::ConversionRateConfig + }, + nil?: true + + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values + # + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, + -> { + Orb::NewDimensionalPriceConfiguration + }, + nil?: true + + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + # + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true + + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + # + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true + + # @!attribute license_type_id + # The ID of the license type to associate with this price. + # + # @return [String, nil] + optional :license_type_id, String, nil?: true + + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + # + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true + + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true + + # @!method initialize(cadence:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_threshold_discounts) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts} + # for more details. + # + # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on. + # + # @param item_id [String] The id of the item the price will be associated with. + # + # @param matrix_with_threshold_discounts_config [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing + # + # @param name [String] The name of the price. + # + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b + # + # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi + # + # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont + # + # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency. + # + # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency. + # + # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr + # + # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values + # + # @param external_price_id [String, nil] An alias for the price. + # + # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl + # + # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice + # + # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced. + # + # @param license_type_id [String, nil] The ID of the license type to associate with this price. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments + # + # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts#cadence + module Cadence + extend Orb::Internal::Type::Enum - class ReplacePrice < Orb::Internal::Type::BaseModel - # @!attribute replaces_price_id - # The id of the price on the plan to replace in the subscription. - # - # @return [String] - required :replaces_price_id, String + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom - # @!attribute allocation_price - # The definition of a new allocation price to create and add to the subscription. - # - # @return [Orb::Models::NewAllocationPrice, nil] - optional :allocation_price, -> { Orb::NewAllocationPrice }, nil?: true + # @!method self.values + # @return [Array] + end - # @!attribute discounts - # @deprecated - # - # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the - # replacement price. - # - # @return [Array, nil] - optional :discounts, -> { Orb::Internal::Type::ArrayOf[Orb::DiscountOverride] }, nil?: true + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + # @!attribute default_unit_amount + # Unit price used for usage that does not match any defined matrix cell. + # + # @return [String] + required :default_unit_amount, String - # @!attribute external_price_id - # The external price id of the price to add to the subscription. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true + # @!attribute first_dimension + # First matrix dimension key. + # + # @return [String] + required :first_dimension, String - # @!attribute fixed_price_quantity - # The new quantity of the price, if the price is a fixed price. - # - # @return [Float, nil] - optional :fixed_price_quantity, Float, nil?: true + # @!attribute matrix_values + # Per-cell unit prices. + # + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + end - # @!attribute maximum_amount - # @deprecated - # - # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for - # the replacement price. - # - # @return [String, nil] - optional :maximum_amount, String, nil?: true + # @!attribute second_dimension + # Optional second matrix dimension key. + # + # @return [String, nil] + optional :second_dimension, String, nil?: true - # @!attribute metric_parameter_overrides - # Override values for parameterized billable metric variables. Keys are parameter - # names, values are the override values. - # - # @return [Hash{Symbol=>Object}, nil] - optional :metric_parameter_overrides, - Orb::Internal::Type::HashOf[Orb::Internal::Type::Unknown], - nil?: true + # @!attribute threshold_discount_groups + # + # @return [Array, nil] + optional :threshold_discount_groups, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + end - # @!attribute minimum_amount - # @deprecated - # - # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for - # the replacement price. - # - # @return [String, nil] - optional :minimum_amount, String, nil?: true + # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil) + # Configuration for matrix_with_threshold_discounts pricing + # + # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell. + # + # @param first_dimension [String] First matrix dimension key. + # + # @param matrix_values [Array] Per-cell unit prices. + # + # @param second_dimension [String, nil] Optional second matrix dimension key. + # + # @param threshold_discount_groups [Array] - # @!attribute price - # New subscription price request body params. - # - # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput, nil] - optional :price, - union: -> { - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price - }, - nil?: true + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute first_dimension_value + # + # @return [String] + required :first_dimension_value, String - # @!attribute price_id - # The id of the price to add to the subscription. - # - # @return [String, nil] - optional :price_id, String, nil?: true + # @!attribute unit_amount + # + # @return [String] + required :unit_amount, String - # @!method initialize(replaces_price_id:, allocation_price: nil, discounts: nil, external_price_id: nil, fixed_price_quantity: nil, maximum_amount: nil, metric_parameter_overrides: nil, minimum_amount: nil, price: nil, price_id: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice} for more - # details. - # - # @param replaces_price_id [String] The id of the price on the plan to replace in the subscription. - # - # @param allocation_price [Orb::Models::NewAllocationPrice, nil] The definition of a new allocation price to create and add to the subscription. - # - # @param discounts [Array, nil] [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the r - # - # @param external_price_id [String, nil] The external price id of the price to add to the subscription. - # - # @param fixed_price_quantity [Float, nil] The new quantity of the price, if the price is a fixed price. - # - # @param maximum_amount [String, nil] [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for - # - # @param metric_parameter_overrides [Hash{Symbol=>Object}, nil] Override values for parameterized billable metric variables. Keys are parameter - # - # @param minimum_amount [String, nil] [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for - # - # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput, nil] New subscription price request body params. - # - # @param price_id [String, nil] The id of the price to add to the subscription. + # @!attribute second_dimension_value + # + # @return [String, nil] + optional :second_dimension_value, String, nil?: true - # New subscription price request body params. - # - # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice#price - module Price - extend Orb::Internal::Type::Union + # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil) + # @param first_dimension_value [String] + # @param unit_amount [String] + # @param second_dimension_value [String, nil] + end - discriminator :model_type + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + # @!attribute above_threshold_discount_percentage + # Discount rate applied to spend above the threshold. + # + # @return [String] + required :above_threshold_discount_percentage, String - variant :unit, -> { Orb::NewSubscriptionUnitPrice } + # @!attribute below_threshold_discount_percentage + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + # + # @return [String] + required :below_threshold_discount_percentage, String - variant :tiered, -> { Orb::NewSubscriptionTieredPrice } + # @!attribute cell_coordinates + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + # + # @return [String] + required :cell_coordinates, String - variant :bulk, -> { Orb::NewSubscriptionBulkPrice } + # @!attribute threshold_amount + # + # @return [String] + required :threshold_amount, String - variant :bulk_with_filters, - -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters } + # @!attribute description + # + # @return [String, nil] + optional :description, String, nil?: true - variant :package, -> { Orb::NewSubscriptionPackagePrice } + # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup} + # for more details. + # + # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold. + # + # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli + # + # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # + # @param threshold_amount [String] + # + # @param description [String, nil] + end + end + end - variant :matrix, -> { Orb::NewSubscriptionMatrixPrice } + class TieredWithProration < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence] + required :cadence, + enum: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence } - variant :threshold_total_amount, -> { Orb::NewSubscriptionThresholdTotalAmountPrice } + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String - variant :tiered_package, -> { Orb::NewSubscriptionTieredPackagePrice } + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :tiered_with_proration] + required :model_type, const: :tiered_with_proration - variant :tiered_with_minimum, -> { Orb::NewSubscriptionTieredWithMinimumPrice } + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String - variant :grouped_tiered, -> { Orb::NewSubscriptionGroupedTieredPrice } + # @!attribute tiered_with_proration_config + # Configuration for tiered_with_proration pricing + # + # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig] + required :tiered_with_proration_config, + -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig } - variant :tiered_package_with_minimum, -> { Orb::NewSubscriptionTieredPackageWithMinimumPrice } + # @!attribute billable_metric_id + # The id of 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 :package_with_allocation, -> { Orb::NewSubscriptionPackageWithAllocationPrice } + # @!attribute billed_in_advance + # If the Price represents a fixed cost, the price will be billed in-advance 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 :unit_with_percent, -> { Orb::NewSubscriptionUnitWithPercentPrice } + # @!attribute billing_cycle_configuration + # For custom cadence: 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 :matrix_with_allocation, -> { Orb::NewSubscriptionMatrixWithAllocationPrice } + # @!attribute 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 :tiered_with_proration, - -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration } + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. + # + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::ConversionRateConfig + }, + nil?: true - variant :unit_with_proration, -> { Orb::NewSubscriptionUnitWithProrationPrice } + # @!attribute currency + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + # + # @return [String, nil] + optional :currency, String, nil?: true - variant :grouped_allocation, -> { Orb::NewSubscriptionGroupedAllocationPrice } + # @!attribute dimensional_price_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 :bulk_with_proration, -> { Orb::NewSubscriptionBulkWithProrationPrice } + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true + + # @!attribute fixed_price_quantity + # 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_with_prorated_minimum, -> { Orb::NewSubscriptionGroupedWithProratedMinimumPrice } + # @!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 :grouped_with_metered_minimum, -> { Orb::NewSubscriptionGroupedWithMeteredMinimumPrice } + # @!attribute invoicing_cycle_configuration + # Within each billing cycle, specifies the cadence at which invoices are 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 :grouped_with_min_max_thresholds, - -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds } + # @!attribute 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 :matrix_with_display_name, -> { Orb::NewSubscriptionMatrixWithDisplayNamePrice } + # @!attribute metadata + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can 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 :grouped_tiered_package, -> { Orb::NewSubscriptionGroupedTieredPackagePrice } + # @!attribute reference_id + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + # + # @return [String, nil] + optional :reference_id, String, nil?: true - variant :max_group_tiered_package, -> { Orb::NewSubscriptionMaxGroupTieredPackagePrice } + # @!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::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration} + # for more details. + # + # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::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::SubscriptionSchedulePlanChangeParams::ReplacePrice::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 - variant :scalable_matrix_with_unit_pricing, -> { Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice } + # The cadence to bill for this price on. + # + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration#cadence + module Cadence + extend Orb::Internal::Type::Enum - variant :scalable_matrix_with_tiered_pricing, - -> { Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice } + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom - variant :cumulative_grouped_bulk, -> { Orb::NewSubscriptionCumulativeGroupedBulkPrice } + # @!method self.values + # @return [Array] + end - variant :cumulative_grouped_allocation, - -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation } + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::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::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] + end - variant :minimum_composite, -> { Orb::NewSubscriptionMinimumCompositePrice } + # @!method initialize(tiers:) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::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 - variant :percent, -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent } + class Tier < Orb::Internal::Type::BaseModel + # @!attribute tier_lower_bound + # Inclusive tier starting value + # + # @return [String] + required :tier_lower_bound, String - variant :event_output, -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput } + # @!attribute unit_amount + # Amount per unit + # + # @return [String] + required :unit_amount, String - class BulkWithFilters < Orb::Internal::Type::BaseModel - # @!attribute bulk_with_filters_config - # Configuration for bulk_with_filters pricing - # - # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig] - required :bulk_with_filters_config, - -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig } + # @!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::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence] + # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence] required :cadence, - enum: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence } + enum: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence } + + # @!attribute grouped_with_min_max_thresholds_config + # Configuration for grouped_with_min_max_thresholds pricing + # + # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] + required :grouped_with_min_max_thresholds_config, + -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } # @!attribute item_id # The id of the item the price will be associated with. @@ -2239,8 +3944,8 @@ class BulkWithFilters < Orb::Internal::Type::BaseModel # @!attribute model_type # The pricing model type # - # @return [Symbol, :bulk_with_filters] - required :model_type, const: :bulk_with_filters + # @return [Symbol, :grouped_with_min_max_thresholds] + required :model_type, const: :grouped_with_min_max_thresholds # @!attribute name # The name of the price. @@ -2281,7 +3986,7 @@ class BulkWithFilters < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::ConversionRateConfig + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::ConversionRateConfig }, nil?: true @@ -2349,14 +4054,14 @@ 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:, 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::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters} + # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds} # for more details. # - # @param bulk_with_filters_config [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing + # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. # - # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence] The cadence to bill for this price on. + # @param grouped_with_min_max_thresholds_config [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::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. # @@ -2390,85 +4095,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::SubscriptionSchedulePlanChangeParams::ReplacePrice::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::SubscriptionSchedulePlanChangeParams::ReplacePrice::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::SubscriptionSchedulePlanChangeParams::ReplacePrice::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, :grouped_with_min_max_thresholds] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters#cadence + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds#cadence module Cadence extend Orb::Internal::Type::Enum @@ -2482,15 +4113,60 @@ module Cadence # @!method self.values # @return [Array] end + + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::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 TieredWithProration < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence] + # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence] required :cadence, - enum: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence } + enum: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence } + + # @!attribute cumulative_grouped_allocation_config + # Configuration for cumulative_grouped_allocation pricing + # + # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] + required :cumulative_grouped_allocation_config, + -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig } # @!attribute item_id # The id of the item the price will be associated with. @@ -2501,8 +4177,8 @@ class TieredWithProration < Orb::Internal::Type::BaseModel # @!attribute model_type # The pricing model type # - # @return [Symbol, :tiered_with_proration] - required :model_type, const: :tiered_with_proration + # @return [Symbol, :cumulative_grouped_allocation] + required :model_type, const: :cumulative_grouped_allocation # @!attribute name # The name of the price. @@ -2510,13 +4186,6 @@ class TieredWithProration < Orb::Internal::Type::BaseModel # @return [String] required :name, String - # @!attribute tiered_with_proration_config - # Configuration for tiered_with_proration pricing - # - # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig] - required :tiered_with_proration_config, - -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig } - # @!attribute billable_metric_id # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -2550,7 +4219,7 @@ class TieredWithProration < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::ConversionRateConfig + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::ConversionRateConfig }, nil?: true @@ -2618,19 +4287,19 @@ 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:, 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::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration} + # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation} # for more details. # - # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on. + # + # @param cumulative_grouped_allocation_config [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::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 tiered_with_proration_config [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::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 @@ -2659,11 +4328,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, :cumulative_grouped_allocation] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration#cadence + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation#cadence module Cadence extend Orb::Internal::Type::Enum @@ -2678,66 +4347,59 @@ module Cadence # @return [Array] end - # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::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 + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation#cumulative_grouped_allocation_config + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + # @!attribute cumulative_allocation + # The overall allocation across all groups # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - end + # @return [String] + required :cumulative_allocation, String - # @!method initialize(tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig} - # for more details. - # - # Configuration for tiered_with_proration pricing + # @!attribute group_allocation + # The allocation per individual group # - # @param tiers [Array] Tiers for rating based on total usage quantities into the specified tier with pr + # @return [String] + required :group_allocation, String - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound - # Inclusive tier starting value - # - # @return [String] - required :tier_lower_bound, String + # @!attribute grouping_key + # The event property used to group usage before applying allocations + # + # @return [String] + required :grouping_key, String - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, String + # @!attribute unit_amount + # The amount to charge for each unit outside of the allocation + # + # @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 + # @!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 GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence] + # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence] required :cadence, - enum: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence } + enum: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence } - # @!attribute grouped_with_min_max_thresholds_config - # Configuration for grouped_with_min_max_thresholds pricing + # @!attribute daily_credit_allowance_config + # Configuration for daily_credit_allowance pricing # - # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] - required :grouped_with_min_max_thresholds_config, - -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } + # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] + required :daily_credit_allowance_config, + -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig } # @!attribute item_id # The id of the item the price will be associated with. @@ -2748,8 +4410,8 @@ class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @!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, :daily_credit_allowance] + required :model_type, const: :daily_credit_allowance # @!attribute name # The name of the price. @@ -2790,7 +4452,7 @@ class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::ConversionRateConfig + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::ConversionRateConfig }, nil?: true @@ -2858,14 +4520,14 @@ 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(cadence:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :daily_credit_allowance) # Some parameter documentations has been truncated, see - # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds} + # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance} # for more details. # - # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence] The cadence to bill for this price on. # - # @param grouped_with_min_max_thresholds_config [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing + # @param daily_credit_allowance_config [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing # # @param item_id [String] The id of the item the price will be associated with. # @@ -2899,11 +4561,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, :daily_credit_allowance] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds#cadence + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance#cadence module Cadence extend Orb::Internal::Type::Enum @@ -2918,59 +4580,99 @@ module Cadence # @return [Array] end - # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::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 + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance#daily_credit_allowance_config + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute daily_allowance + # Credits granted per day. Lose-it-or-use-it; does not roll over. # # @return [String] - required :grouping_key, String + required :daily_allowance, String - # @!attribute maximum_charge - # The maximum amount to charge each group + # @!attribute default_unit_amount + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value # # @return [String] - required :maximum_charge, String + required :default_unit_amount, String - # @!attribute minimum_charge - # The minimum amount to charge each group, regardless of usage + # @!attribute dimensions + # One or two event property values to evaluate matrix groups by # - # @return [String] - required :minimum_charge, String + # @return [Array] + required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true] - # @!attribute per_unit_rate - # The base price charged per group + # @!attribute event_day_property + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. # # @return [String] - required :per_unit_rate, String + required :event_day_property, String - # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:) - # Configuration for grouped_with_min_max_thresholds pricing + # @!attribute matrix_values + # Per-dimension credit rates # - # @param grouping_key [String] The event property used to group before applying thresholds + # @return [Array] + required :matrix_values, + -> do + Orb::Internal::Type::ArrayOf[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + end + + # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig} + # for more details. # - # @param maximum_charge [String] The maximum amount to charge each group + # Configuration for daily_credit_allowance pricing # - # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage + # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over. # - # @param per_unit_rate [String] The base price charged per group + # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified + # matrix\_ + # + # @param dimensions [Array] One or two event property values to evaluate matrix groups by + # + # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g. + # + # @param matrix_values [Array] Per-dimension credit rates + + class MatrixValue < Orb::Internal::Type::BaseModel + # @!attribute dimension_values + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + # + # @return [Array] + required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true] + + # @!attribute unit_amount + # Credits charged per unit of usage matching the specified dimension_values + # + # @return [String] + required :unit_amount, String + + # @!method initialize(dimension_values:, unit_amount:) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue} + # for more details. + # + # Per-dimension credit price for the daily credit allowance model. + # + # @param dimension_values [Array] One or two matrix keys to filter usage to this value by. For example, ["model"] + # + # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values + end end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence] + # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence] required :cadence, - enum: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence } - - # @!attribute cumulative_grouped_allocation_config - # Configuration for cumulative_grouped_allocation pricing - # - # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] - required :cumulative_grouped_allocation_config, - -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig } + enum: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -2978,11 +4680,18 @@ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # @return [String] required :item_id, String + # @!attribute metered_allowance_config + # Configuration for metered_allowance pricing + # + # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig] + required :metered_allowance_config, + -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig } + # @!attribute model_type # The pricing model type # - # @return [Symbol, :cumulative_grouped_allocation] - required :model_type, const: :cumulative_grouped_allocation + # @return [Symbol, :metered_allowance] + required :model_type, const: :metered_allowance # @!attribute name # The name of the price. @@ -3023,7 +4732,7 @@ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::ConversionRateConfig + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::ConversionRateConfig }, nil?: true @@ -3091,17 +4800,17 @@ 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:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :metered_allowance) # Some parameter documentations has been truncated, see - # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation} + # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance} # for more details. # - # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on. - # - # @param cumulative_grouped_allocation_config [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing + # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence] The cadence to bill for this price on. # # @param item_id [String] The id of the item the price will be associated with. # + # @param metered_allowance_config [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing + # # @param name [String] The name of the price. # # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b @@ -3132,11 +4841,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, :metered_allowance] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation#cadence + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance#cadence module Cadence extend Orb::Internal::Type::Enum @@ -3151,42 +4860,67 @@ module Cadence # @return [Array] end - # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation#cumulative_grouped_allocation_config - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - # @!attribute cumulative_allocation - # The overall allocation across all groups + # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance#metered_allowance_config + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + # @!attribute allowance_grouping_value + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. # # @return [String] - required :cumulative_allocation, String + required :allowance_grouping_value, String - # @!attribute group_allocation - # The allocation per individual group + # @!attribute consumption_grouping_value + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. # # @return [String] - required :group_allocation, String + required :consumption_grouping_value, String # @!attribute grouping_key - # The event property used to group usage before applying allocations + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. # # @return [String] required :grouping_key, String # @!attribute unit_amount - # The amount to charge for each unit outside of the allocation + # Per-unit price applied to gross consumption and to the allowance credit. # # @return [String] required :unit_amount, String - # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:) - # Configuration for cumulative_grouped_allocation pricing + # @!attribute allowance_display_name + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). # - # @param cumulative_allocation [String] The overall allocation across all groups + # @return [String, nil] + optional :allowance_display_name, String + + # @!attribute consumption_display_name + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). # - # @param group_allocation [String] The allocation per individual group + # @return [String, nil] + optional :consumption_display_name, String + + # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig} + # for more details. # - # @param grouping_key [String] The event property used to group usage before applying allocations + # Configuration for metered_allowance pricing # - # @param unit_amount [String] The amount to charge for each unit outside of the allocation + # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p + # + # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl + # + # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant + # + # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit. + # + # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + # + # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten'). end end @@ -3632,7 +5366,7 @@ class EventOutputConfig < Orb::Internal::Type::BaseModel end # @!method self.variants - # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput)] + # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput)] end end end diff --git a/lib/orb/resources/alerts.rb b/lib/orb/resources/alerts.rb index f6c47103..0ab0c743 100644 --- a/lib/orb/resources/alerts.rb +++ b/lib/orb/resources/alerts.rb @@ -194,7 +194,7 @@ def create_for_external_customer(external_customer_id, params) # per metric that is a part of the subscription. Alerts are triggered based on # usage or cost conditions met during the current billing cycle. # - # @overload create_for_subscription(subscription_id, thresholds:, type:, grouping_keys: nil, metric_id: nil, pricing_unit_id: nil, request_options: {}) + # @overload create_for_subscription(subscription_id, thresholds:, type:, grouping_keys: nil, metric_id: nil, price_filters: nil, pricing_unit_id: nil, threshold_overrides: nil, request_options: {}) # # @param subscription_id [String] # @@ -206,8 +206,12 @@ def create_for_external_customer(external_customer_id, params) # # @param metric_id [String, nil] The metric to track usage for. # + # @param price_filters [Array, nil] Filters to scope which prices are included in grouped cost alert evaluation. Sup + # # @param pricing_unit_id [String, nil] The pricing unit to use for grouped cost alerts. Required when grouping_keys is # + # @param threshold_overrides [Array, nil] Per-group threshold overrides. Each override maps a specific combination of grou + # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [Orb::Models::Alert] diff --git a/lib/orb/resources/customers/credits/ledger.rb b/lib/orb/resources/customers/credits/ledger.rb index 962719b3..101c86a0 100644 --- a/lib/orb/resources/customers/credits/ledger.rb +++ b/lib/orb/resources/customers/credits/ledger.rb @@ -199,11 +199,17 @@ def list(customer_id, params = {}) # ## Deducting Credits # # Orb allows you to deduct credits from a customer by creating an entry of type - # `decrement`. Orb matches the algorithm for automatic deductions for determining - # which credit blocks to decrement from. In the case that the deduction leads to - # multiple ledger entries, the response from this endpoint will be the final - # deduction. Orb also optionally allows specifying a description to assist with - # auditing. + # `decrement`. A `decrement` entry records credits as usage and immediately + # recognizes revenue at the block's `per_unit_cost_basis`. + # + # For most credit removals, use `void` (no revenue impact) or `expiration_change` + # (revenue recognized on expiration) instead. Only use `decrement` when credits + # were genuinely consumed outside of normal event ingestion. + # + # Orb matches the algorithm for automatic deductions for determining which credit + # blocks to decrement from. In the case that the deduction leads to multiple + # ledger entries, the response from this endpoint will be the final deduction. Orb + # also optionally allows specifying a description to assist with auditing. # # The following snippet illustrates a sample request body to decrement credits. # @@ -337,11 +343,17 @@ def create_entry(customer_id, params) # ## Deducting Credits # # Orb allows you to deduct credits from a customer by creating an entry of type - # `decrement`. Orb matches the algorithm for automatic deductions for determining - # which credit blocks to decrement from. In the case that the deduction leads to - # multiple ledger entries, the response from this endpoint will be the final - # deduction. Orb also optionally allows specifying a description to assist with - # auditing. + # `decrement`. A `decrement` entry records credits as usage and immediately + # recognizes revenue at the block's `per_unit_cost_basis`. + # + # For most credit removals, use `void` (no revenue impact) or `expiration_change` + # (revenue recognized on expiration) instead. Only use `decrement` when credits + # were genuinely consumed outside of normal event ingestion. + # + # Orb matches the algorithm for automatic deductions for determining which credit + # blocks to decrement from. In the case that the deduction leads to multiple + # ledger entries, the response from this endpoint will be the final deduction. Orb + # also optionally allows specifying a description to assist with auditing. # # The following snippet illustrates a sample request body to decrement credits. # diff --git a/lib/orb/resources/invoices.rb b/lib/orb/resources/invoices.rb index 164484fa..1c4386ed 100644 --- a/lib/orb/resources/invoices.rb +++ b/lib/orb/resources/invoices.rb @@ -108,6 +108,10 @@ def update(invoice_id, params = {}) # values for each draft invoice, which may not always be up-to-date since Orb # regularly refreshes invoices asynchronously. # + # If you don't need line item details, minimums, maximums, or discounts, prefer + # the [list invoices summary](/api-reference/invoice/list-invoices-summary) + # endpoint for better performance. + # # @overload list(amount: nil, amount_gt: nil, amount_lt: nil, cursor: nil, customer_id: nil, date_type: nil, due_date: nil, due_date_window: nil, due_date_gt: nil, due_date_lt: nil, external_customer_id: nil, invoice_date_gt: nil, invoice_date_gte: nil, invoice_date_lt: nil, invoice_date_lte: nil, is_recurring: nil, limit: nil, status: nil, subscription_id: nil, request_options: {}) # # @param amount [String, nil] diff --git a/lib/orb/resources/metrics.rb b/lib/orb/resources/metrics.rb index a94380cc..58247812 100644 --- a/lib/orb/resources/metrics.rb +++ b/lib/orb/resources/metrics.rb @@ -73,9 +73,8 @@ def update(metric_id, params = {}) # Some parameter documentations has been truncated, see # {Orb::Models::MetricListParams} for more details. # - # This endpoint is used to fetch [metric](/core-concepts##metric) details given a - # metric identifier. It returns information about the metrics including its name, - # description, and item. + # This endpoint is used to list [metrics](/core-concepts#metric). It returns + # information about the metrics including its name, description, and item. # # @overload list(created_at_gt: nil, created_at_gte: nil, created_at_lt: nil, created_at_lte: nil, cursor: nil, limit: nil, request_options: {}) # @@ -114,8 +113,9 @@ def list(params = {}) ) end - # This endpoint is used to list [metrics](/core-concepts#metric). It returns - # information about the metrics including its name, description, and item. + # This endpoint is used to fetch [metric](/core-concepts#metric) details given a + # metric identifier. It returns information about the metrics including its name, + # description, and item. # # @overload fetch(metric_id, request_options: {}) # diff --git a/lib/orb/resources/plans.rb b/lib/orb/resources/plans.rb index bddb9617..1f45d879 100644 --- a/lib/orb/resources/plans.rb +++ b/lib/orb/resources/plans.rb @@ -26,7 +26,7 @@ class Plans # # This endpoint allows creation of plans including their prices. # - # @overload create(currency:, name:, prices:, adjustments: nil, default_invoice_memo: nil, external_plan_id: nil, metadata: nil, net_terms: nil, plan_phases: nil, status: nil, request_options: {}) + # @overload create(currency:, name:, prices:, adjustments: nil, default_invoice_memo: nil, description: nil, external_plan_id: nil, metadata: nil, net_terms: nil, plan_phases: nil, status: nil, request_options: {}) # # @param currency [String] An ISO 4217 currency string for invoices generated by subscriptions on this plan # @@ -38,6 +38,8 @@ class Plans # # @param default_invoice_memo [String, nil] Free-form text which is available on the invoice PDF and the Orb invoice portal. # + # @param description [String, nil] An optional user-defined description of the plan. + # # @param external_plan_id [String, nil] # # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed @@ -61,15 +63,17 @@ def create(params) # Some parameter documentations has been truncated, see # {Orb::Models::PlanUpdateParams} for more details. # - # This endpoint can be used to update the `external_plan_id`, and `metadata` of an - # existing plan. + # This endpoint can be used to update the `external_plan_id`, `description`, and + # `metadata` of an existing plan. # # Other fields on a plan are currently immutable. # - # @overload update(plan_id, external_plan_id: nil, metadata: nil, request_options: {}) + # @overload update(plan_id, description: nil, external_plan_id: nil, metadata: nil, request_options: {}) # # @param plan_id [String] # + # @param description [String, nil] An optional user-defined description of the plan. + # # @param external_plan_id [String, nil] An optional user-defined ID for this plan resource, used throughout the system a # # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed diff --git a/lib/orb/resources/plans/external_plan_id.rb b/lib/orb/resources/plans/external_plan_id.rb index 0f3a4b5f..e8f2dc98 100644 --- a/lib/orb/resources/plans/external_plan_id.rb +++ b/lib/orb/resources/plans/external_plan_id.rb @@ -11,15 +11,17 @@ class ExternalPlanID # Some parameter documentations has been truncated, see # {Orb::Models::Plans::ExternalPlanIDUpdateParams} for more details. # - # This endpoint can be used to update the `external_plan_id`, and `metadata` of an - # existing plan. + # This endpoint can be used to update the `external_plan_id`, `description`, and + # `metadata` of an existing plan. # # Other fields on a plan are currently immutable. # - # @overload update(other_external_plan_id, external_plan_id: nil, metadata: nil, request_options: {}) + # @overload update(other_external_plan_id, description: nil, external_plan_id: nil, metadata: nil, request_options: {}) # # @param other_external_plan_id [String] # + # @param description [String, nil] An optional user-defined description of the plan. + # # @param external_plan_id [String, nil] An optional user-defined ID for this plan resource, used throughout the system a # # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed diff --git a/lib/orb/resources/prices.rb b/lib/orb/resources/prices.rb index 267d239c..8650e25d 100644 --- a/lib/orb/resources/prices.rb +++ b/lib/orb/resources/prices.rb @@ -39,11 +39,11 @@ class Prices # # @overload create(body:, request_options: {}) # - # @param body [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput] New floating price request body params. + # @param body [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::PriceCreateParams::Body::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput] New floating price request body params. # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] # # @see Orb::Models::PriceCreateParams def create(params) @@ -72,7 +72,7 @@ def create(params) # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] # # @see Orb::Models::PriceUpdateParams def update(price_id, params = {}) @@ -100,7 +100,7 @@ def update(price_id, params = {}) # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Orb::Internal::Page] + # @return [Orb::Internal::Page] # # @see Orb::Models::PriceListParams def list(params = {}) @@ -293,7 +293,7 @@ def evaluate_preview_events(params) # @param price_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] # # @see Orb::Models::PriceFetchParams def fetch(price_id, params = {}) diff --git a/lib/orb/resources/prices/external_price_id.rb b/lib/orb/resources/prices/external_price_id.rb index c8a3e738..8ca392c0 100644 --- a/lib/orb/resources/prices/external_price_id.rb +++ b/lib/orb/resources/prices/external_price_id.rb @@ -29,7 +29,7 @@ class ExternalPriceID # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] # # @see Orb::Models::Prices::ExternalPriceIDUpdateParams def update(external_price_id, params = {}) @@ -52,7 +52,7 @@ def update(external_price_id, params = {}) # @param external_price_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # - # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] + # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] # # @see Orb::Models::Prices::ExternalPriceIDFetchParams def fetch(external_price_id, params = {}) diff --git a/lib/orb/resources/subscriptions.rb b/lib/orb/resources/subscriptions.rb index 2532f4fc..326d2e1e 100644 --- a/lib/orb/resources/subscriptions.rb +++ b/lib/orb/resources/subscriptions.rb @@ -1327,6 +1327,12 @@ def trigger_phase(subscription_id, params = {}) # cancellation. This operation will turn on auto-renew, ensuring that the # subscription does not end at the currently scheduled cancellation time. # + # Note: uncancellation is a lossy operation. Price intervals that were cut short + # by the cancellation are extended to infinity (original end dates are lost), and + # future intervals or phases scheduled after the cancellation time are permanently + # deleted. For complex subscriptions with phases or scheduled plan changes, + # consider creating a new plan change instead of uncancelling. + # # @overload unschedule_cancellation(subscription_id, request_options: {}) # # @param subscription_id [String] diff --git a/lib/orb/version.rb b/lib/orb/version.rb index b43d5ca2..9d1f4bdc 100644 --- a/lib/orb/version.rb +++ b/lib/orb/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Orb - VERSION = "1.14.0" + VERSION = "1.15.0" end diff --git a/rbi/orb/models/accounting_provider_config.rbi b/rbi/orb/models/accounting_provider_config.rbi index a99c5dbf..e675ed48 100644 --- a/rbi/orb/models/accounting_provider_config.rbi +++ b/rbi/orb/models/accounting_provider_config.rbi @@ -11,24 +11,57 @@ module Orb sig { returns(String) } attr_accessor :external_provider_id - sig { returns(String) } + sig { returns(Orb::AccountingProviderConfig::ProviderType::OrSymbol) } attr_accessor :provider_type sig do - params(external_provider_id: String, provider_type: String).returns( - T.attached_class - ) + params( + external_provider_id: String, + provider_type: Orb::AccountingProviderConfig::ProviderType::OrSymbol + ).returns(T.attached_class) end def self.new(external_provider_id:, provider_type:) end sig do override.returns( - { external_provider_id: String, provider_type: String } + { + external_provider_id: String, + provider_type: Orb::AccountingProviderConfig::ProviderType::OrSymbol + } ) end def to_hash end + + module ProviderType + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::AccountingProviderConfig::ProviderType) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + QUICKBOOKS = + T.let( + :quickbooks, + Orb::AccountingProviderConfig::ProviderType::TaggedSymbol + ) + NETSUITE = + T.let( + :netsuite, + Orb::AccountingProviderConfig::ProviderType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[Orb::AccountingProviderConfig::ProviderType::TaggedSymbol] + ) + end + def self.values + end + end end end end diff --git a/rbi/orb/models/alert.rbi b/rbi/orb/models/alert.rbi index 185194d1..e7ffa311 100644 --- a/rbi/orb/models/alert.rbi +++ b/rbi/orb/models/alert.rbi @@ -79,6 +79,16 @@ module Orb end attr_writer :license_type + # Filters scoping which prices are included in grouped cost alert evaluation. + sig { returns(T.nilable(T::Array[Orb::Alert::PriceFilter])) } + attr_accessor :price_filters + + # Per-group threshold overrides. Each override maps a specific combination of + # grouping_keys values to a replacement threshold list. Only present for grouped + # cost alerts that have at least one override. + sig { returns(T.nilable(T::Array[Orb::Alert::ThresholdOverride])) } + attr_accessor :threshold_overrides + # [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending, # usage, or credit balance and trigger webhooks when a threshold is exceeded. # @@ -99,7 +109,10 @@ module Orb balance_alert_status: T.nilable(T::Array[Orb::Alert::BalanceAlertStatus::OrHash]), grouping_keys: T.nilable(T::Array[String]), - license_type: T.nilable(Orb::Alert::LicenseType::OrHash) + license_type: T.nilable(Orb::Alert::LicenseType::OrHash), + price_filters: T.nilable(T::Array[Orb::Alert::PriceFilter::OrHash]), + threshold_overrides: + T.nilable(T::Array[Orb::Alert::ThresholdOverride::OrHash]) ).returns(T.attached_class) end def self.new( @@ -131,7 +144,13 @@ module Orb # grouping enabled. grouping_keys: nil, # Minified license type for alert serialization. - license_type: nil + license_type: nil, + # Filters scoping which prices are included in grouped cost alert evaluation. + price_filters: nil, + # Per-group threshold overrides. Each override maps a specific combination of + # grouping_keys values to a replacement threshold list. Only present for grouped + # cost alerts that have at least one override. + threshold_overrides: nil ) end @@ -151,7 +170,10 @@ module Orb balance_alert_status: T.nilable(T::Array[Orb::Alert::BalanceAlertStatus]), grouping_keys: T.nilable(T::Array[String]), - license_type: T.nilable(Orb::Alert::LicenseType) + license_type: T.nilable(Orb::Alert::LicenseType), + price_filters: T.nilable(T::Array[Orb::Alert::PriceFilter]), + threshold_overrides: + T.nilable(T::Array[Orb::Alert::ThresholdOverride]) } ) end @@ -307,6 +329,153 @@ module Orb def to_hash end end + + class PriceFilter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(Orb::Alert::PriceFilter, Orb::Internal::AnyHash) + end + + # The property of the price to filter on. + sig { returns(Orb::Alert::PriceFilter::Field::TaggedSymbol) } + attr_accessor :field + + # Should prices that match the filter be included or excluded. + sig { returns(Orb::Alert::PriceFilter::Operator::TaggedSymbol) } + attr_accessor :operator + + # The IDs or values that match this filter. + sig { returns(T::Array[String]) } + attr_accessor :values + + sig do + params( + field: Orb::Alert::PriceFilter::Field::OrSymbol, + operator: Orb::Alert::PriceFilter::Operator::OrSymbol, + values: T::Array[String] + ).returns(T.attached_class) + end + def self.new( + # The property of the price to filter on. + field:, + # Should prices that match the filter be included or excluded. + operator:, + # The IDs or values that match this filter. + values: + ) + end + + sig do + override.returns( + { + field: Orb::Alert::PriceFilter::Field::TaggedSymbol, + operator: Orb::Alert::PriceFilter::Operator::TaggedSymbol, + values: T::Array[String] + } + ) + end + def to_hash + end + + # The property of the price to filter on. + module Field + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, Orb::Alert::PriceFilter::Field) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PRICE_ID = + T.let(:price_id, Orb::Alert::PriceFilter::Field::TaggedSymbol) + ITEM_ID = + T.let(:item_id, Orb::Alert::PriceFilter::Field::TaggedSymbol) + PRICE_TYPE = + T.let(:price_type, Orb::Alert::PriceFilter::Field::TaggedSymbol) + CURRENCY = + T.let(:currency, Orb::Alert::PriceFilter::Field::TaggedSymbol) + PRICING_UNIT_ID = + T.let( + :pricing_unit_id, + Orb::Alert::PriceFilter::Field::TaggedSymbol + ) + + sig do + override.returns( + T::Array[Orb::Alert::PriceFilter::Field::TaggedSymbol] + ) + end + def self.values + end + end + + # Should prices that match the filter be included or excluded. + module Operator + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, Orb::Alert::PriceFilter::Operator) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + INCLUDES = + T.let(:includes, Orb::Alert::PriceFilter::Operator::TaggedSymbol) + EXCLUDES = + T.let(:excludes, Orb::Alert::PriceFilter::Operator::TaggedSymbol) + + sig do + override.returns( + T::Array[Orb::Alert::PriceFilter::Operator::TaggedSymbol] + ) + end + def self.values + end + end + end + + class ThresholdOverride < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(Orb::Alert::ThresholdOverride, Orb::Internal::AnyHash) + end + + # The values of the grouping keys that identify this group. The list length + # matches the alert's grouping_keys. + sig { returns(T::Array[String]) } + attr_accessor :group_values + + # The thresholds applied to this group. An empty list means the group is silenced. + sig { returns(T::Array[Orb::Threshold]) } + attr_accessor :thresholds + + # A per-group threshold override on a grouped cost alert. + # + # An empty `thresholds` list means the group is silenced (never fires). A + # non-empty list fully replaces the default thresholds for that group. + sig do + params( + group_values: T::Array[String], + thresholds: T::Array[Orb::Threshold::OrHash] + ).returns(T.attached_class) + end + def self.new( + # The values of the grouping keys that identify this group. The list length + # matches the alert's grouping_keys. + group_values:, + # The thresholds applied to this group. An empty list means the group is silenced. + thresholds: + ) + end + + sig do + override.returns( + { + group_values: T::Array[String], + thresholds: T::Array[Orb::Threshold] + } + ) + end + def to_hash + end + end end end end diff --git a/rbi/orb/models/alert_create_for_subscription_params.rbi b/rbi/orb/models/alert_create_for_subscription_params.rbi index 3bb64bdd..c0047c61 100644 --- a/rbi/orb/models/alert_create_for_subscription_params.rbi +++ b/rbi/orb/models/alert_create_for_subscription_params.rbi @@ -31,11 +31,37 @@ module Orb sig { returns(T.nilable(String)) } attr_accessor :metric_id + # Filters to scope which prices are included in grouped cost alert evaluation. + # Supports filtering by price_id, item_id, or price_type with includes/excludes + # operators. Only applicable when grouping_keys is set. + sig do + returns( + T.nilable( + T::Array[Orb::AlertCreateForSubscriptionParams::PriceFilter] + ) + ) + end + attr_accessor :price_filters + # The pricing unit to use for grouped cost alerts. Required when grouping_keys is # set. sig { returns(T.nilable(String)) } attr_accessor :pricing_unit_id + # Per-group threshold overrides. Each override maps a specific combination of + # grouping_keys values to a list of thresholds that fully replaces the default + # thresholds for that group. An empty thresholds list silences the group. Groups + # without an override use the default thresholds. Only applicable when + # grouping_keys is set. + sig do + returns( + T.nilable( + T::Array[Orb::AlertCreateForSubscriptionParams::ThresholdOverride] + ) + ) + end + attr_accessor :threshold_overrides + sig do params( subscription_id: String, @@ -43,7 +69,19 @@ module Orb type: Orb::AlertCreateForSubscriptionParams::Type::OrSymbol, grouping_keys: T.nilable(T::Array[String]), metric_id: T.nilable(String), + price_filters: + T.nilable( + T::Array[ + Orb::AlertCreateForSubscriptionParams::PriceFilter::OrHash + ] + ), pricing_unit_id: T.nilable(String), + threshold_overrides: + T.nilable( + T::Array[ + Orb::AlertCreateForSubscriptionParams::ThresholdOverride::OrHash + ] + ), request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end @@ -58,9 +96,19 @@ module Orb grouping_keys: nil, # The metric to track usage for. metric_id: nil, + # Filters to scope which prices are included in grouped cost alert evaluation. + # Supports filtering by price_id, item_id, or price_type with includes/excludes + # operators. Only applicable when grouping_keys is set. + price_filters: nil, # The pricing unit to use for grouped cost alerts. Required when grouping_keys is # set. pricing_unit_id: nil, + # Per-group threshold overrides. Each override maps a specific combination of + # grouping_keys values to a list of thresholds that fully replaces the default + # thresholds for that group. An empty thresholds list silences the group. Groups + # without an override use the default thresholds. Only applicable when + # grouping_keys is set. + threshold_overrides: nil, request_options: {} ) end @@ -73,7 +121,17 @@ module Orb type: Orb::AlertCreateForSubscriptionParams::Type::OrSymbol, grouping_keys: T.nilable(T::Array[String]), metric_id: T.nilable(String), + price_filters: + T.nilable( + T::Array[Orb::AlertCreateForSubscriptionParams::PriceFilter] + ), pricing_unit_id: T.nilable(String), + threshold_overrides: + T.nilable( + T::Array[ + Orb::AlertCreateForSubscriptionParams::ThresholdOverride + ] + ), request_options: Orb::RequestOptions } ) @@ -110,6 +168,207 @@ module Orb def self.values end end + + class PriceFilter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::AlertCreateForSubscriptionParams::PriceFilter, + Orb::Internal::AnyHash + ) + end + + # The property of the price to filter on. + sig do + returns( + Orb::AlertCreateForSubscriptionParams::PriceFilter::Field::OrSymbol + ) + end + attr_accessor :field + + # Should prices that match the filter be included or excluded. + sig do + returns( + Orb::AlertCreateForSubscriptionParams::PriceFilter::Operator::OrSymbol + ) + end + attr_accessor :operator + + # The IDs or values that match this filter. + sig { returns(T::Array[String]) } + attr_accessor :values + + sig do + params( + field: + Orb::AlertCreateForSubscriptionParams::PriceFilter::Field::OrSymbol, + operator: + Orb::AlertCreateForSubscriptionParams::PriceFilter::Operator::OrSymbol, + values: T::Array[String] + ).returns(T.attached_class) + end + def self.new( + # The property of the price to filter on. + field:, + # Should prices that match the filter be included or excluded. + operator:, + # The IDs or values that match this filter. + values: + ) + end + + sig do + override.returns( + { + field: + Orb::AlertCreateForSubscriptionParams::PriceFilter::Field::OrSymbol, + operator: + Orb::AlertCreateForSubscriptionParams::PriceFilter::Operator::OrSymbol, + values: T::Array[String] + } + ) + end + def to_hash + end + + # The property of the price to filter on. + module Field + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::AlertCreateForSubscriptionParams::PriceFilter::Field + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PRICE_ID = + T.let( + :price_id, + Orb::AlertCreateForSubscriptionParams::PriceFilter::Field::TaggedSymbol + ) + ITEM_ID = + T.let( + :item_id, + Orb::AlertCreateForSubscriptionParams::PriceFilter::Field::TaggedSymbol + ) + PRICE_TYPE = + T.let( + :price_type, + Orb::AlertCreateForSubscriptionParams::PriceFilter::Field::TaggedSymbol + ) + CURRENCY = + T.let( + :currency, + Orb::AlertCreateForSubscriptionParams::PriceFilter::Field::TaggedSymbol + ) + PRICING_UNIT_ID = + T.let( + :pricing_unit_id, + Orb::AlertCreateForSubscriptionParams::PriceFilter::Field::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::AlertCreateForSubscriptionParams::PriceFilter::Field::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Should prices that match the filter be included or excluded. + module Operator + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::AlertCreateForSubscriptionParams::PriceFilter::Operator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + INCLUDES = + T.let( + :includes, + Orb::AlertCreateForSubscriptionParams::PriceFilter::Operator::TaggedSymbol + ) + EXCLUDES = + T.let( + :excludes, + Orb::AlertCreateForSubscriptionParams::PriceFilter::Operator::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::AlertCreateForSubscriptionParams::PriceFilter::Operator::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class ThresholdOverride < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::AlertCreateForSubscriptionParams::ThresholdOverride, + Orb::Internal::AnyHash + ) + end + + # The values of the grouping keys that identify this group. The list length must + # match the alert's grouping_keys, and values appear in the same order as + # grouping_keys. + sig { returns(T::Array[String]) } + attr_accessor :group_values + + # The thresholds to apply to this group. An empty list silences alerts for this + # group. A non-empty list fully replaces the default thresholds for this group. + sig { returns(T::Array[Orb::Threshold]) } + attr_accessor :thresholds + + # Per-group threshold override on a grouped cost alert. + # + # - An empty `thresholds` list silences alerts for this group (never fires). + # - A non-empty list fully replaces the default thresholds for this group. + sig do + params( + group_values: T::Array[String], + thresholds: T::Array[Orb::Threshold::OrHash] + ).returns(T.attached_class) + end + def self.new( + # The values of the grouping keys that identify this group. The list length must + # match the alert's grouping_keys, and values appear in the same order as + # grouping_keys. + group_values:, + # The thresholds to apply to this group. An empty list silences alerts for this + # group. A non-empty list fully replaces the default thresholds for this group. + thresholds: + ) + end + + sig do + override.returns( + { + group_values: T::Array[String], + thresholds: T::Array[Orb::Threshold] + } + ) + end + def to_hash + end + end end end end diff --git a/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi b/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi index 91ef379c..22eafcfd 100644 --- a/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +++ b/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi @@ -330,43 +330,21 @@ module Orb sig do returns( T.nilable( - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput - ) + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice ) ) end - attr_accessor :license_allocation_price + attr_reader :license_allocation_price + + sig do + params( + license_allocation_price: + T.nilable( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::OrHash + ) + ).void + end + attr_writer :license_allocation_price # The phase to add this price to. sig { returns(T.nilable(Integer)) } @@ -391,6 +369,7 @@ module Orb Orb::NewPlanPackageWithAllocationPrice, Orb::NewPlanUnitWithPercentPrice, Orb::NewPlanMatrixWithAllocationPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::NewPlanUnitWithProrationPrice, Orb::NewPlanGroupedAllocationPrice, @@ -405,6 +384,8 @@ module Orb Orb::NewPlanScalableMatrixWithTieredPricingPrice, Orb::NewPlanCumulativeGroupedBulkPrice, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::NewPlanMinimumCompositePrice, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput @@ -419,39 +400,7 @@ module Orb allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), license_allocation_price: T.nilable( - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::OrHash - ) + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::OrHash ), plan_phase_order: T.nilable(Integer), price: @@ -471,6 +420,7 @@ module Orb Orb::NewPlanPackageWithAllocationPrice::OrHash, Orb::NewPlanUnitWithPercentPrice::OrHash, Orb::NewPlanMatrixWithAllocationPrice::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::OrHash, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::OrHash, Orb::NewPlanUnitWithProrationPrice::OrHash, Orb::NewPlanGroupedAllocationPrice::OrHash, @@ -485,6 +435,8 @@ module Orb Orb::NewPlanScalableMatrixWithTieredPricingPrice::OrHash, Orb::NewPlanCumulativeGroupedBulkPrice::OrHash, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::OrHash, Orb::NewPlanMinimumCompositePrice::OrHash, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::OrHash, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::OrHash @@ -510,39 +462,7 @@ module Orb allocation_price: T.nilable(Orb::NewAllocationPrice), license_allocation_price: T.nilable( - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput - ) + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice ), plan_phase_order: T.nilable(Integer), price: @@ -562,6 +482,7 @@ module Orb Orb::NewPlanPackageWithAllocationPrice, Orb::NewPlanUnitWithPercentPrice, Orb::NewPlanMatrixWithAllocationPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::NewPlanUnitWithProrationPrice, Orb::NewPlanGroupedAllocationPrice, @@ -576,6 +497,8 @@ module Orb Orb::NewPlanScalableMatrixWithTieredPricingPrice, Orb::NewPlanCumulativeGroupedBulkPrice, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::NewPlanMinimumCompositePrice, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput @@ -587,466 +510,510 @@ module Orb def to_hash end - # The license allocation price to add to the plan. - module LicenseAllocationPrice - extend Orb::Internal::Type::Union - - Variants = + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice, + Orb::Internal::AnyHash ) end - class Unit < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do + # The cadence to bill for this price on. + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation + ] + ) + end + attr_accessor :license_allocations + + # The pricing model type + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::OrSymbol + ) + end + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # Configuration for unit pricing + sig { returns(Orb::UnitConfig) } + attr_reader :unit_config + + sig { params(unit_config: Orb::UnitConfig::OrHash).void } + attr_writer :unit_config + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, - Orb::Internal::AnyHash + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol ) - end - attr_accessor :cadence + ) + end + attr_accessor :conversion_rate_config - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + # The license allocation price to add to the plan. + sig do + params( + cadence: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::OrSymbol, + item_id: String, + license_allocations: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation::OrHash + ], + model_type: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::OrSymbol, + name: String, + unit_config: Orb::UnitConfig::OrHash, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, # License allocations to associate with this price. Each entry defines a # per-license credit pool granted each cadence. Requires license_type_id or # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - + license_allocations:, # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - + model_type:, # The name of the price. - sig { returns(String) } - attr_accessor :name - + name:, # Configuration for unit pricing - sig { returns(Orb::UnitConfig) } - attr_reader :unit_config - - sig { params(unit_config: Orb::UnitConfig::OrHash).void } - attr_writer :unit_config - + unit_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - + billable_metric_id: nil, # If the Price represents a fixed cost, the price will be billed in-advance if # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - + billed_in_advance: nil, # For custom cadence: specifies the duration of the billing period in days or # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - + billing_cycle_configuration: nil, # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - + conversion_rate: nil, # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - + conversion_rate_config: nil, # An ISO 4217 currency string, or custom pricing unit identifier, in which this # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - + currency: nil, # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - + dimensional_price_configuration: nil, # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - + external_price_id: nil, # If the Price represents a fixed cost, this represents the quantity of units # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - + fixed_price_quantity: nil, # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - + invoice_grouping_key: nil, # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - + invoicing_cycle_configuration: nil, # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - + license_type_id: nil, # User-specified key/value pairs for the resource. Individual keys can be removed # by setting the value to `null`, and the entire metadata mapping can be cleared # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - + metadata: nil, # A transient ID that can be used to reference this price when adding adjustments # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id + reference_id: nil + ) + end - sig do - params( + sig do + override.returns( + { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::OrSymbol, item_id: String, license_allocations: T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation::OrHash + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation ], + model_type: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::OrSymbol, name: String, - unit_config: Orb::UnitConfig::OrHash, + unit_config: Orb::UnitConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + T.nilable(Orb::NewBillingCycleConfiguration), conversion_rate: T.nilable(Float), conversion_rate_config: T.nilable( T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig ) ), currency: T.nilable(String), dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + T.nilable(Orb::NewDimensionalPriceConfiguration), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + T.nilable(Orb::NewBillingCycleConfiguration), license_type_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit pricing - unit_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit + reference_id: T.nilable(String) + } ) - end + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) sig do override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_config: Orb::UnitConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ] ) end - def to_hash + def self.values end + end - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ] + class LicenseAllocation < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation, + Orb::Internal::AnyHash ) end - def self.values - end - end - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation, - Orb::Internal::AnyHash - ) - end + # The amount of credits granted per active license per cadence. + sig { returns(String) } + attr_accessor :amount - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount + # The currency of the license allocation. + sig { returns(String) } + attr_accessor :currency - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + # When True, overage beyond the allocation is written off. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :write_off_overage + sig do + params( + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) + ).returns(T.attached_class) + end + def self.new( + # The amount of credits granted per active license per cadence. + amount:, + # The currency of the license allocation. + currency:, # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + write_off_overage: nil + ) + end - sig do - params( + sig do + override.returns( + { amount: String, currency: String, write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + } ) - end + end + def to_hash + end + end - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } + # The pricing model type + module ModelType + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType ) end - def to_hash - end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNIT = + T.let( + :unit, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ] + ) + end + def self.values end end + end + + # New plan price request body params. + module Price + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewPlanUnitPrice, + Orb::NewPlanTieredPrice, + Orb::NewPlanBulkPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, + Orb::NewPlanPackagePrice, + Orb::NewPlanMatrixPrice, + Orb::NewPlanThresholdTotalAmountPrice, + Orb::NewPlanTieredPackagePrice, + Orb::NewPlanTieredWithMinimumPrice, + Orb::NewPlanGroupedTieredPrice, + Orb::NewPlanTieredPackageWithMinimumPrice, + Orb::NewPlanPackageWithAllocationPrice, + Orb::NewPlanUnitWithPercentPrice, + Orb::NewPlanMatrixWithAllocationPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts, + 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::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, + Orb::NewPlanMinimumCompositePrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput + ) + end - class Tiered < Orb::Internal::Type::BaseModel + class BulkWithFilters < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Internal::AnyHash ) end - # The cadence to bill for this price on. + # Configuration for bulk_with_filters pricing sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig ) end - attr_accessor :cadence + attr_reader :bulk_with_filters_config - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + sig do + params( + bulk_with_filters_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash + ).void + end + attr_writer :bulk_with_filters_config - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. + # The cadence to bill for this price on. sig do returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation - ] + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol ) end - attr_accessor :license_allocations + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id # The pricing model type sig { returns(Symbol) } @@ -1056,13 +1023,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for tiered pricing - sig { returns(Orb::TieredConfig) } - attr_reader :tiered_config - - sig { params(tiered_config: Orb::TieredConfig::OrHash).void } - attr_writer :tiered_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -1163,15 +1123,12 @@ module Orb sig do params( + bulk_with_filters_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation::OrHash - ], name: String, - tiered_config: Orb::TieredConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1199,18 +1156,14 @@ module Orb ).returns(T.attached_class) end def self.new( + # Configuration for bulk_with_filters pricing + bulk_with_filters_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, - # Configuration for tiered pricing - tiered_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -1249,23 +1202,20 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered + model_type: :bulk_with_filters ) end sig do override.returns( { + bulk_with_filters_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation - ], model_type: Symbol, name: String, - tiered_config: Orb::TieredConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1295,133 +1245,228 @@ module Orb def to_hash end - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + OrHash = T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::Internal::AnyHash ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol + # Property filters to apply (all must match) + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ] ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol + end + attr_accessor :filters + + # Bulk tiers for rating based on total usage volume + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] ) + end + attr_accessor :tiers + + # Configuration for bulk_with_filters pricing + sig do + params( + filters: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash + ], + tiers: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Property filters to apply (all must match) + filters:, + # Bulk tiers for rating based on total usage volume + tiers: + ) + end sig do override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ] + { + filters: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ], + tiers: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + } ) end - def self.values + def to_hash end - end - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation, - Orb::Internal::AnyHash + class Filter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::Internal::AnyHash + ) + end + + # Event property key to filter on + sig { returns(String) } + attr_accessor :property_key + + # Event property value to match + sig { returns(String) } + attr_accessor :property_value + + # Configuration for a single property filter + sig do + params( + property_key: String, + property_value: String + ).returns(T.attached_class) + end + def self.new( + # Event property key to filter on + property_key:, + # Event property value to match + property_value: + ) + end + + sig do + override.returns( + { property_key: String, property_value: String } ) end + def to_hash + end + end - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, + Orb::Internal::AnyHash + ) + end - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # The lower bound for this tier + sig { returns(T.nilable(String)) } + attr_accessor :tier_lower_bound - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) + # Configuration for a single bulk pricing tier + sig do + params( + unit_amount: String, + tier_lower_bound: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Amount per unit + unit_amount:, + # The lower bound for this tier + tier_lower_bound: nil + ) + end + + sig do + override.returns( + { + unit_amount: String, + tier_lower_bound: T.nilable(String) + } + ) + end + def to_hash + end end + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) sig do override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ] ) end - def to_hash + def self.values end end end - class Bulk < Orb::Internal::Type::BaseModel + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Internal::AnyHash ) end - # Configuration for bulk pricing - sig { returns(Orb::BulkConfig) } - attr_reader :bulk_config - - sig { params(bulk_config: Orb::BulkConfig::OrHash).void } - attr_writer :bulk_config - # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol ) end attr_accessor :cadence @@ -1430,17 +1475,21 @@ 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. + # Configuration for matrix_with_threshold_discounts pricing sig do returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation - ] + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig ) end - attr_accessor :license_allocations + attr_reader :matrix_with_threshold_discounts_config + + sig do + params( + matrix_with_threshold_discounts_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash + ).void + end + attr_writer :matrix_with_threshold_discounts_config # The pricing model type sig { returns(Symbol) } @@ -1550,14 +1599,11 @@ module Orb sig do params( - bulk_config: Orb::BulkConfig::OrHash, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation::OrHash - ], + matrix_with_threshold_discounts_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -1586,16 +1632,12 @@ module Orb ).returns(T.attached_class) end def self.new( - # Configuration for bulk pricing - bulk_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, + # Configuration for matrix_with_threshold_discounts pricing + matrix_with_threshold_discounts_config:, # The name of the price. name:, # The id of the billable metric for the price. Only needed if the price is @@ -1636,21 +1678,18 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :bulk + model_type: :matrix_with_threshold_discounts ) end sig do override.returns( { - bulk_config: Orb::BulkConfig, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation - ], + matrix_with_threshold_discounts_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -1690,7 +1729,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -1698,38 +1737,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ] ) end @@ -1737,87 +1776,236 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. + # Unit price used for usage that does not match any defined matrix cell. sig { returns(String) } - attr_accessor :amount + attr_accessor :default_unit_amount - # The currency of the license allocation. + # First matrix dimension key. sig { returns(String) } - attr_accessor :currency + attr_accessor :first_dimension - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # Per-cell unit prices. + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Optional second matrix dimension key. + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension + + sig do + returns( + T.nilable( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + ) + ) + end + attr_reader :threshold_discount_groups sig do params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + threshold_discount_groups: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).void + end + attr_writer :threshold_discount_groups + + # Configuration for matrix_with_threshold_discounts pricing + sig do + params( + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] ).returns(T.attached_class) end def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + # Unit price used for usage that does not match any defined matrix cell. + default_unit_amount:, + # First matrix dimension key. + first_dimension:, + # Per-cell unit prices. + matrix_values:, + # Optional second matrix dimension key. + second_dimension: nil, + threshold_discount_groups: nil ) end sig do override.returns( { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] } ) end def to_hash end - end - end - class BulkWithFilters < Orb::Internal::Type::BaseModel + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :first_dimension_value + + sig { returns(String) } + attr_accessor :unit_amount + + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension_value + + sig do + params( + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + first_dimension_value:, + unit_amount:, + second_dimension_value: nil + ) + end + + sig do + override.returns( + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + } + ) + end + def to_hash + end + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup, + Orb::Internal::AnyHash + ) + end + + # Discount rate applied to spend above the threshold. + sig { returns(String) } + attr_accessor :above_threshold_discount_percentage + + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + sig { returns(String) } + attr_accessor :below_threshold_discount_percentage + + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + sig { returns(String) } + attr_accessor :cell_coordinates + + sig { returns(String) } + attr_accessor :threshold_amount + + sig { returns(T.nilable(String)) } + attr_accessor :description + + sig do + params( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Discount rate applied to spend above the threshold. + above_threshold_discount_percentage:, + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + below_threshold_discount_percentage:, + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + cell_coordinates:, + threshold_amount:, + description: nil + ) + end + + sig do + override.returns( + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + } + ) + end + def to_hash + end + end + end + end + + class TieredWithProration < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Internal::AnyHash ) end - # Configuration for bulk_with_filters pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig - ) - end - attr_reader :bulk_with_filters_config - - sig do - params( - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::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::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol ) end attr_accessor :cadence @@ -1826,18 +2014,6 @@ module Orb sig { returns(String) } attr_accessor :item_id - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -1846,6 +2022,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for tiered_with_proration pricing + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig + ) + end + attr_reader :tiered_with_proration_config + + sig do + params( + tiered_with_proration_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + ).void + end + attr_writer :tiered_with_proration_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -1946,16 +2138,12 @@ module Orb sig do params( - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation::OrHash - ], name: String, + tiered_with_proration_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1983,18 +2171,14 @@ module Orb ).returns(T.attached_class) end def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, + # Configuration for tiered_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, @@ -2033,24 +2217,20 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :bulk_with_filters + model_type: :tiered_with_proration ) end sig do override.returns( { - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ], model_type: Symbol, name: String, + tiered_with_proration_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2080,52 +2260,93 @@ module Orb def to_hash end - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash + 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 + ) - # Property filters to apply (all must match) sig do - returns( + override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ] ) end - attr_accessor :filters + def self.values + end + end - # Bulk tiers for rating based on total usage volume + 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::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier ] ) end attr_accessor :tiers - # Configuration for bulk_with_filters pricing + # Configuration for tiered_with_proration pricing sig do params( - filters: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], tiers: T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash ] ).returns(T.attached_class) end def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume + # Tiers for rating based on total usage quantities into the specified tier with + # proration tiers: ) end @@ -2133,13 +2354,9 @@ module Orb 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 + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier ] } ) @@ -2147,204 +2364,54 @@ module Orb def to_hash end - class Filter < Orb::Internal::Type::BaseModel + class Tier < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, Orb::Internal::AnyHash ) end - # Event property key to filter on + # Inclusive tier starting value sig { returns(String) } - attr_accessor :property_key + attr_accessor :tier_lower_bound - # Event property value to match + # Amount per unit sig { returns(String) } - attr_accessor :property_value + attr_accessor :unit_amount - # Configuration for a single property filter + # Configuration for a single tiered with proration tier sig do params( - property_key: String, - property_value: String + tier_lower_bound: String, + unit_amount: String ).returns(T.attached_class) end def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: + # Inclusive tier starting value + tier_lower_bound:, + # Amount per unit + unit_amount: ) end sig do override.returns( - { property_key: String, property_value: String } + { tier_lower_bound: String, unit_amount: String } ) end def to_hash end end + 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 - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - 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 + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Internal::AnyHash ) end @@ -2352,26 +2419,30 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol ) end attr_accessor :cadence - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. + # Configuration for grouped_with_min_max_thresholds pricing sig do returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation - ] + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig ) end - attr_accessor :license_allocations + 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) } @@ -2381,13 +2452,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for package pricing - sig { returns(Orb::PackageConfig) } - attr_reader :package_config - - sig { params(package_config: Orb::PackageConfig::OrHash).void } - attr_writer :package_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -2489,14 +2553,11 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation::OrHash - ], name: String, - package_config: Orb::PackageConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2526,16 +2587,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for grouped_with_min_max_thresholds pricing + grouped_with_min_max_thresholds_config:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, - # Configuration for package pricing - package_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -2574,7 +2631,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :package + model_type: :grouped_with_min_max_thresholds ) end @@ -2582,15 +2639,12 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation - ], model_type: Symbol, name: String, - package_config: Orb::PackageConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2628,7 +2682,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2636,38 +2690,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ] ) end @@ -2675,50 +2729,59 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. + # The event property used to group before applying thresholds sig { returns(String) } - attr_accessor :amount + attr_accessor :grouping_key - # The currency of the license allocation. + # The maximum amount to charge each group sig { returns(String) } - attr_accessor :currency + attr_accessor :maximum_charge - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # 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( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String ).returns(T.attached_class) end def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + # The 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( { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } ) end @@ -2727,11 +2790,11 @@ module Orb end end - class Matrix < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Internal::AnyHash ) end @@ -2739,33 +2802,30 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol ) end attr_accessor :cadence - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. + # Configuration for cumulative_grouped_allocation pricing sig do returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation - ] + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig ) end - attr_accessor :license_allocations + attr_reader :cumulative_grouped_allocation_config - # Configuration for matrix pricing - sig { returns(Orb::MatrixConfig) } - attr_reader :matrix_config + sig do + params( + cumulative_grouped_allocation_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + ).void + end + attr_writer :cumulative_grouped_allocation_config - sig { params(matrix_config: Orb::MatrixConfig::OrHash).void } - attr_writer :matrix_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) } @@ -2876,13 +2936,10 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation::OrHash - ], - matrix_config: Orb::MatrixConfig::OrHash, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -2913,14 +2970,10 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for cumulative_grouped_allocation pricing + cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # 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 @@ -2961,7 +3014,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :matrix + model_type: :cumulative_grouped_allocation ) end @@ -2969,13 +3022,10 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation - ], - matrix_config: Orb::MatrixConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -3015,7 +3065,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3023,38 +3073,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ] ) end @@ -3062,50 +3112,59 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. + # The overall allocation across all groups sig { returns(String) } - attr_accessor :amount + attr_accessor :cumulative_allocation - # The currency of the license allocation. + # The allocation per individual group sig { returns(String) } - attr_accessor :currency + attr_accessor :group_allocation - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # The event property used to group usage before applying allocations + sig { returns(String) } + attr_accessor :grouping_key + + # The amount to charge for each unit outside of the allocation + sig { returns(String) } + attr_accessor :unit_amount + # Configuration for cumulative_grouped_allocation pricing sig do params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String ).returns(T.attached_class) end def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + # The overall allocation across all groups + cumulative_allocation:, + # The allocation per individual group + group_allocation:, + # The event property used to group usage before applying allocations + grouping_key:, + # The amount to charge for each unit outside of the allocation + unit_amount: ) end sig do override.returns( { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } ) end @@ -3114,11 +3173,11 @@ module Orb end end - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -3126,26 +3185,30 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. + # Configuration for daily_credit_allowance pricing sig do returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ] + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig ) end - attr_accessor :license_allocations + attr_reader :daily_credit_allowance_config + + sig do + params( + daily_credit_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash + ).void + end + attr_writer :daily_credit_allowance_config + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id # The pricing model type sig { returns(Symbol) } @@ -3155,22 +3218,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for threshold_total_amount pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig - ) - end - attr_reader :threshold_total_amount_config - - sig do - params( - threshold_total_amount_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::OrHash - ).void - end - attr_writer :threshold_total_amount_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -3272,15 +3319,11 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation::OrHash - ], name: String, - threshold_total_amount_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3310,16 +3353,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, - # Configuration for threshold_total_amount pricing - threshold_total_amount_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -3358,7 +3397,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :threshold_total_amount + model_type: :daily_credit_allowance ) end @@ -3366,16 +3405,12 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ], model_type: Symbol, name: String, - threshold_total_amount_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3413,7 +3448,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3421,38 +3456,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -3460,146 +3495,131 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. + # Credits granted per day. Lose-it-or-use-it; does not roll over. sig { returns(String) } - attr_accessor :amount + attr_accessor :daily_allowance - # The currency of the license allocation. + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end + attr_accessor :default_unit_amount - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - Orb::Internal::AnyHash - ) - end + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + sig { returns(String) } + attr_accessor :event_day_property - # When the quantity consumed passes a provided threshold, the configured total - # will be charged + # Per-dimension credit rates sig do returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue ] ) end - attr_accessor :consumption_table + attr_accessor :matrix_values - # 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 + # Configuration for daily_credit_allowance pricing sig do params( - consumption_table: + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable::OrHash - ], - prorate: T.nilable(T::Boolean) + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] ).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 + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end sig do override.returns( { - consumption_table: + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ], - prorate: T.nilable(T::Boolean) + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] } ) end def to_hash end - class ConsumptionTable < Orb::Internal::Type::BaseModel + class MatrixValue < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, Orb::Internal::AnyHash ) end - sig { returns(String) } - attr_accessor :threshold + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values - # Total amount for this threshold + # Credits charged per unit of usage matching the specified dimension_values sig { returns(String) } - attr_accessor :total_amount + attr_accessor :unit_amount - # Configuration for a single threshold + # Per-dimension credit price for the daily credit allowance model. sig do - params(threshold: String, total_amount: String).returns( - T.attached_class - ) + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) end def self.new( - threshold:, - # Total amount for this threshold - total_amount: + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: ) end sig do override.returns( - { threshold: String, total_amount: String } + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } ) end def to_hash @@ -3608,11 +3628,11 @@ module Orb end end - class TieredPackage < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Internal::AnyHash ) end @@ -3620,7 +3640,7 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol ) end attr_accessor :cadence @@ -3629,17 +3649,21 @@ 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. + # Configuration for metered_allowance pricing sig do returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation - ] + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig ) end - attr_accessor :license_allocations + attr_reader :metered_allowance_config + + sig do + params( + metered_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash + ).void + end + attr_writer :metered_allowance_config # The pricing model type sig { returns(Symbol) } @@ -3649,22 +3673,6 @@ module Orb 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)) } @@ -3766,15 +3774,11 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation::OrHash - ], + metered_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::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: @@ -3806,14 +3810,10 @@ module Orb cadence:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, + # Configuration for metered_allowance pricing + metered_allowance_config:, # 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, @@ -3852,7 +3852,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered_package + model_type: :metered_allowance ) end @@ -3860,16 +3860,12 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation - ], + metered_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, 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: @@ -3907,7 +3903,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3915,38 +3911,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ] ) end @@ -3954,161 +3950,104 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. sig { returns(String) } - attr_accessor :amount + attr_accessor :allowance_grouping_value - # The currency of the license allocation. + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. sig { returns(String) } - attr_accessor :currency + attr_accessor :consumption_grouping_value - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + sig { returns(String) } + attr_accessor :grouping_key - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end + # Per-unit price applied to gross consumption and to the allowance credit. + sig { returns(String) } + attr_accessor :unit_amount - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name - 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 { params(allowance_display_name: String).void } + attr_writer :allowance_display_name - sig { returns(String) } - attr_accessor :package_size + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name - # 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 + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name - # Configuration for tiered_package pricing + # Configuration for metered_allowance pricing sig do params( - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier::OrHash - ] + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String ).returns(T.attached_class) end def self.new( - 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: + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + grouping_key:, + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil ) end sig do override.returns( { - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } ) end def to_hash end - - class 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 + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Internal::AnyHash ) end @@ -4116,7 +4055,7 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol ) end attr_accessor :cadence @@ -4125,18 +4064,6 @@ module Orb sig { returns(String) } attr_accessor :item_id - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -4145,21 +4072,21 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for tiered_with_minimum pricing + # Configuration for percent pricing sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig ) end - attr_reader :tiered_with_minimum_config + attr_reader :percent_config sig do params( - tiered_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::OrHash + percent_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash ).void end - attr_writer :tiered_with_minimum_config + attr_writer :percent_config # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -4262,15 +4189,11 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::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, + 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: @@ -4302,14 +4225,10 @@ module Orb cadence:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, - # Configuration for tiered_with_minimum pricing - tiered_with_minimum_config:, + # 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, @@ -4348,7 +4267,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered_with_minimum + model_type: :percent ) end @@ -4356,16 +4275,12 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::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, + 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: @@ -4403,7 +4318,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -4411,38 +4326,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ] ) end @@ -4450,183 +4365,38 @@ module Orb 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 + class PercentConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, 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 + # What percent of the component subtotals to charge + sig { returns(Float) } + attr_accessor :percent - # 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 + # Configuration for percent pricing + sig { params(percent: Float).returns(T.attached_class) } 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 + # What percent of the component subtotals to charge + percent: ) 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 + sig { override.returns({ percent: Float }) } 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 + class EventOutput < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput, Orb::Internal::AnyHash ) end @@ -4634,43 +4404,31 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for grouped_tiered pricing + # Configuration for event_output pricing sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig ) end - attr_reader :grouped_tiered_config + attr_reader :event_output_config sig do params( - grouped_tiered_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::OrHash + event_output_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash ).void end - attr_writer :grouped_tiered_config + 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::GroupedTiered::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -4780,14 +4538,10 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol, - grouped_tiered_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation::OrHash - ], name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -4818,14 +4572,10 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for grouped_tiered pricing - grouped_tiered_config:, + # 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 @@ -4866,7 +4616,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :grouped_tiered + model_type: :event_output ) end @@ -4874,14 +4624,10 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol, - grouped_tiered_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation - ], model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -4921,7 +4667,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -4929,38 +4675,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ] ) end @@ -4968,26286 +4714,974 @@ module Orb end end - class GroupedTieredConfig < Orb::Internal::Type::BaseModel + class EventOutputConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, Orb::Internal::AnyHash ) end - # The billable metric property used to group before tiering + # The key in the event data to extract the unit rate from. sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :unit_rating_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 + # 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 grouped_tiered pricing + # Configuration for event_output pricing sig do params( - grouping_key: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier::OrHash - ] + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) ).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: + # 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( { - grouping_key: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) } ) end def to_hash end + end + 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 + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Variants + ] + ) + end + def self.variants + end + end + end - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount + class RemoveAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::RemoveAdjustment, + Orb::Internal::AnyHash + ) + end - # 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 + # The id of the adjustment to remove from on the plan. + sig { returns(String) } + attr_accessor :adjustment_id - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end + # The phase to remove this adjustment from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation, - Orb::Internal::AnyHash - ) - end + sig do + params( + adjustment_id: String, + plan_phase_order: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # The id of the adjustment to remove from on the plan. + adjustment_id:, + # The phase to remove this adjustment from. + plan_phase_order: nil + ) + end - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount + sig do + override.returns( + { adjustment_id: String, plan_phase_order: T.nilable(Integer) } + ) + end + def to_hash + end + end - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + class RemovePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::RemovePrice, + Orb::Internal::AnyHash + ) + end - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # The id of the price to remove from the plan. + sig { returns(String) } + attr_accessor :price_id - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end + # The phase to remove this price from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end + sig do + params( + price_id: String, + plan_phase_order: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # The id of the price to remove from the plan. + price_id:, + # The phase to remove this price from. + plan_phase_order: nil + ) + end + + sig do + override.returns( + { price_id: String, plan_phase_order: T.nilable(Integer) } + ) + end + def to_hash + end + end + + class ReplaceAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment, + Orb::Internal::AnyHash + ) end - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Internal::AnyHash - ) - end + # The definition of a new adjustment to create and add to the plan. + sig do + returns( + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ) + ) + end + attr_accessor :adjustment - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence + # The id of the adjustment on the plan to replace in the plan. + sig { returns(String) } + attr_accessor :replaces_adjustment_id - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + # The phase to replace this adjustment from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations + sig do + params( + adjustment: + T.any( + Orb::NewPercentageDiscount::OrHash, + Orb::NewUsageDiscount::OrHash, + Orb::NewAmountDiscount::OrHash, + Orb::NewMinimum::OrHash, + Orb::NewMaximum::OrHash + ), + replaces_adjustment_id: String, + plan_phase_order: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # The definition of a new adjustment to create and add to the plan. + adjustment:, + # The id of the adjustment on the plan to replace in the plan. + replaces_adjustment_id:, + # The phase to replace this adjustment from. + plan_phase_order: nil + ) + end - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type + sig do + override.returns( + { + adjustment: + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ), + replaces_adjustment_id: String, + plan_phase_order: T.nilable(Integer) + } + ) + end + def to_hash + end - # The name of the price. - sig { returns(String) } - attr_accessor :name + # The definition of a new adjustment to create and add to the plan. + module Adjustment + extend Orb::Internal::Type::Union - # Configuration for tiered_package_with_minimum pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig + Variants = + T.type_alias do + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum ) 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 + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Variants + ] + ) + end + def self.variants + end + end + end - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id + class ReplacePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice, + Orb::Internal::AnyHash + ) + end - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance + # The id of the price on the plan to replace in the plan. + sig { returns(String) } + attr_accessor :replaces_price_id - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration + # The allocation price to add to the plan. + sig { returns(T.nilable(Orb::NewAllocationPrice)) } + attr_reader :allocation_price - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation::OrHash - ], - name: String, - tiered_package_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_package_with_minimum pricing - tiered_package_with_minimum_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_package_with_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_package_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(Float) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_package_with_minimum pricing - sig do - params( - package_size: Float, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - tiers: - ) - end - - sig do - override.returns( - { - package_size: Float, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :minimum_amount - - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier - sig do - params( - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - ).returns(T.attached_class) - end - def self.new(minimum_amount:, per_unit:, tier_lower_bound:) - end - - sig do - override.returns( - { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - ) - end - def to_hash - end - end - end - end - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for package_with_allocation pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig - ) - end - attr_reader :package_with_allocation_config - - sig do - params( - package_with_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig::OrHash - ).void - end - attr_writer :package_with_allocation_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation::OrHash - ], - name: String, - package_with_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for package_with_allocation pricing - package_with_allocation_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :package_with_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - package_with_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :allocation - - sig { returns(String) } - attr_accessor :package_amount - - sig { returns(String) } - attr_accessor :package_size - - # Configuration for package_with_allocation pricing - sig do - params( - allocation: String, - package_amount: String, - package_size: String - ).returns(T.attached_class) - end - def self.new(allocation:, package_amount:, package_size:) - end - - sig do - override.returns( - { - allocation: String, - package_amount: String, - package_size: String - } - ) - end - def to_hash - end - end - end - - class UnitWithPercent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit_with_percent pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig - ) - end - attr_reader :unit_with_percent_config - - sig do - params( - unit_with_percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig::OrHash - ).void - end - attr_writer :unit_with_percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation::OrHash - ], - name: String, - unit_with_percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit_with_percent pricing - unit_with_percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit_with_percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_with_percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent, out of 100, of the calculated total to charge - sig { returns(String) } - attr_accessor :percent - - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for unit_with_percent pricing - sig do - params(percent: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # What percent, out of 100, of the calculated total to charge - percent:, - # Rate per unit of usage - unit_amount: - ) - end - - sig do - override.returns({ percent: String, unit_amount: String }) - end - def to_hash - end - end - end - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix_with_allocation pricing - sig { returns(Orb::MatrixWithAllocationConfig) } - attr_reader :matrix_with_allocation_config - - sig do - params( - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash - ).void - end - attr_writer :matrix_with_allocation_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation::OrHash - ], - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix_with_allocation pricing - matrix_with_allocation_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix_with_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ], - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation::OrHash - ], - name: String, - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params( - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class UnitWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit_with_proration pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig - ) - end - attr_reader :unit_with_proration_config - - sig do - params( - unit_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig::OrHash - ).void - end - attr_writer :unit_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation::OrHash - ], - name: String, - unit_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit_with_proration pricing - unit_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for unit_with_proration pricing - sig { params(unit_amount: String).returns(T.attached_class) } - def self.new( - # Rate per unit of usage - unit_amount: - ) - end - - sig { override.returns({ unit_amount: String }) } - def to_hash - end - end - end - - class GroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_allocation pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig - ) - end - attr_reader :grouped_allocation_config - - sig do - params( - grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig::OrHash - ).void - end - attr_writer :grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol, - grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_allocation pricing - grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol, - grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # Usage allocation per group - sig { returns(String) } - attr_accessor :allocation - - # How to determine the groups that should each be allocated some quantity - sig { returns(String) } - attr_accessor :grouping_key - - # Unit rate for post-allocation - sig { returns(String) } - attr_accessor :overage_unit_rate - - # Configuration for grouped_allocation pricing - sig do - params( - allocation: String, - grouping_key: String, - overage_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # Usage allocation per group - allocation:, - # How to determine the groups that should each be allocated some quantity - grouping_key:, - # Unit rate for post-allocation - overage_unit_rate: - ) - end - - sig do - override.returns( - { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class BulkWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk_with_proration pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig - ) - end - attr_reader :bulk_with_proration_config - - sig do - params( - bulk_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::OrHash - ).void - end - attr_writer :bulk_with_proration_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::OrHash, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk_with_proration pricing - bulk_with_proration_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_proration - ) - end - - sig do - override.returns( - { - bulk_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Cost per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier with proration - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Cost per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { - unit_amount: String, - tier_lower_bound: T.nilable(String) - } - ) - end - def to_hash - end - end - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_prorated_minimum pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig - ) - end - attr_reader :grouped_with_prorated_minimum_config - - sig do - params( - grouped_with_prorated_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_prorated_minimum_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol, - grouped_with_prorated_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_prorated_minimum pricing - grouped_with_prorated_minimum_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_prorated_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol, - grouped_with_prorated_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # How to determine the groups that should each have a minimum - sig { returns(String) } - attr_accessor :grouping_key - - # The minimum amount to charge per group - sig { returns(String) } - attr_accessor :minimum - - # The amount to charge per unit - sig { returns(String) } - attr_accessor :unit_rate - - # Configuration for grouped_with_prorated_minimum pricing - sig do - params( - grouping_key: String, - minimum: String, - unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # How to determine the groups that should each have a minimum - grouping_key:, - # The minimum amount to charge per group - minimum:, - # The amount to charge per unit - unit_rate: - ) - end - - sig do - override.returns( - { grouping_key: String, minimum: String, unit_rate: String } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_metered_minimum pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig - ) - end - attr_reader :grouped_with_metered_minimum_config - - sig do - params( - grouped_with_metered_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_metered_minimum_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol, - grouped_with_metered_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_metered_minimum pricing - grouped_with_metered_minimum_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_metered_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol, - grouped_with_metered_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - sig { returns(String) } - attr_accessor :grouping_key - - # The minimum amount to charge per group per unit - sig { returns(String) } - attr_accessor :minimum_unit_amount - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :pricing_key - - # Scale the unit rates by the scaling factor. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ] - ) - end - attr_accessor :scaling_factors - - # Used to determine the unit rate scaling factor - sig { returns(String) } - attr_accessor :scaling_key - - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts - - # Configuration for grouped_with_metered_minimum pricing - sig do - params( - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor::OrHash - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - grouping_key:, - # The minimum amount to charge per group per unit - minimum_unit_amount:, - # Used to determine the unit rate - pricing_key:, - # Scale the unit rates by the scaling factor. - scaling_factors:, - # Used to determine the unit rate scaling factor - scaling_key:, - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - unit_amounts: - ) - end - - sig do - override.returns( - { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - } - ) - end - def to_hash - end - - class ScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(String) } - attr_accessor :scaling_value - - # Configuration for a scaling factor - sig do - params( - scaling_factor: String, - scaling_value: String - ).returns(T.attached_class) - end - def self.new(scaling_factor:, scaling_value:) - end - - sig do - override.returns( - { scaling_factor: String, scaling_value: String } - ) - end - def to_hash - end - end - - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :pricing_value - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a unit amount - sig do - params(pricing_value: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - pricing_value:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { pricing_value: String, unit_amount: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - ) - end - attr_reader :grouped_with_min_max_thresholds_config - - sig do - params( - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash - ).void - end - attr_writer :grouped_with_min_max_thresholds_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_min_max_thresholds - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before applying thresholds - sig { returns(String) } - attr_accessor :grouping_key - - # The maximum amount to charge each group - sig { returns(String) } - attr_accessor :maximum_charge - - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge - - # The base price charged per group - sig { returns(String) } - attr_accessor :per_unit_rate - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before applying thresholds - grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: - ) - end - - sig do - override.returns( - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix_with_display_name pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig - ) - end - attr_reader :matrix_with_display_name_config - - sig do - params( - matrix_with_display_name_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash - ).void - end - attr_writer :matrix_with_display_name_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation::OrHash - ], - matrix_with_display_name_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix_with_display_name pricing - matrix_with_display_name_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix_with_display_name - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ], - matrix_with_display_name_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - Orb::Internal::AnyHash - ) - end - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :dimension - - # Apply per unit pricing to each dimension value - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts - - # Configuration for matrix_with_display_name pricing - sig do - params( - dimension: String, - unit_amounts: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Used to determine the unit rate - dimension:, - # Apply per unit pricing to each dimension value - unit_amounts: - ) - end - - sig do - override.returns( - { - dimension: String, - unit_amounts: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - } - ) - end - def to_hash - end - - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount, - Orb::Internal::AnyHash - ) - end - - # The dimension value - sig { returns(String) } - attr_accessor :dimension_value - - # Display name for this dimension value - sig { returns(String) } - attr_accessor :display_name - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a unit amount item - sig do - params( - dimension_value: String, - display_name: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The dimension value - dimension_value:, - # Display name for this dimension value - display_name:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { - dimension_value: String, - display_name: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - end - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_tiered_package pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig - ) - end - attr_reader :grouped_tiered_package_config - - sig do - params( - grouped_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash - ).void - end - attr_writer :grouped_tiered_package_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol, - grouped_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_tiered_package pricing - grouped_tiered_package_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol, - grouped_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before tiering - sig { returns(String) } - attr_accessor :grouping_key - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for grouped_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before tiering - grouping_key:, - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Per package - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier - sig do - params(per_unit: String, tier_lower_bound: String).returns( - T.attached_class - ) - end - def self.new( - # Per package - per_unit:, - tier_lower_bound: - ) - end - - sig do - override.returns( - { per_unit: String, tier_lower_bound: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for max_group_tiered_package pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig - ) - end - attr_reader :max_group_tiered_package_config - - sig do - params( - max_group_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash - ).void - end - attr_writer :max_group_tiered_package_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation::OrHash - ], - max_group_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for max_group_tiered_package pricing - max_group_tiered_package_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :max_group_tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ], - max_group_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before tiering the group with the highest value - sig { returns(String) } - attr_accessor :grouping_key - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing to the largest group after grouping with the provided key. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for max_group_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before tiering the group with the highest value - grouping_key:, - package_size:, - # Apply tiered pricing to the largest group after grouping with the provided key. - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params( - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig - ) - end - attr_reader :scalable_matrix_with_unit_pricing_config - - sig do - params( - scalable_matrix_with_unit_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_unit_pricing_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation::OrHash - ], - name: String, - scalable_matrix_with_unit_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for scalable_matrix_with_unit_pricing pricing - scalable_matrix_with_unit_pricing_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :scalable_matrix_with_unit_pricing - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ], - model_type: Symbol, - name: String, - scalable_matrix_with_unit_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - Orb::Internal::AnyHash - ) - end - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :first_dimension - - # Apply a scaling factor to each dimension - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors - - # The final unit price to rate against the output of the matrix - sig { returns(String) } - attr_accessor :unit_price - - # The property used to group this price - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :prorate - - # Used to determine the unit rate (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension - - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor::OrHash - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Used to determine the unit rate - first_dimension:, - # Apply a scaling factor to each dimension - matrix_scaling_factors:, - # The final unit price to rate against the output of the matrix - unit_price:, - # The property used to group this price - grouping_key: nil, - # If true, the unit price will be prorated to the billing period - prorate: nil, - # Used to determine the unit rate (optional) - second_dimension: nil - ) - end - - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) - } - ) - end - def to_hash - end - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :first_dimension_value - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value - - # Configuration for a single matrix scaling factor - sig do - params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil - ) - end - - sig do - override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } - ) - end - def to_hash - end - end - end - end - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig - ) - end - attr_reader :scalable_matrix_with_tiered_pricing_config - - sig do - params( - scalable_matrix_with_tiered_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_tiered_pricing_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation::OrHash - ], - name: String, - scalable_matrix_with_tiered_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for scalable_matrix_with_tiered_pricing pricing - scalable_matrix_with_tiered_pricing_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :scalable_matrix_with_tiered_pricing - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ], - model_type: Symbol, - name: String, - scalable_matrix_with_tiered_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - Orb::Internal::AnyHash - ) - end - - # Used for the scalable matrix first dimension - sig { returns(String) } - attr_accessor :first_dimension - - # Apply a scaling factor to each dimension - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors - - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Used for the scalable matrix second dimension (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension - - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor::OrHash - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier::OrHash - ], - second_dimension: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Used for the scalable matrix first dimension - first_dimension:, - # Apply a scaling factor to each dimension - matrix_scaling_factors:, - tiers:, - # Used for the scalable matrix second dimension (optional) - second_dimension: nil - ) - end - - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ], - second_dimension: T.nilable(String) - } - ) - end - def to_hash - end - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :first_dimension_value - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value - - # Configuration for a single matrix scaling factor - sig do - params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil - ) - end - - sig do - override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier entry with business logic - sig do - params( - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new(tier_lower_bound:, unit_amount:) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_bulk pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig - ) - end - attr_reader :cumulative_grouped_bulk_config - - sig do - params( - cumulative_grouped_bulk_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_bulk_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol, - cumulative_grouped_bulk_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_bulk pricing - cumulative_grouped_bulk_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_bulk - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol, - cumulative_grouped_bulk_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - Orb::Internal::AnyHash - ) - end - - # Each tier lower bound must have the same group of values. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ] - ) - end - attr_accessor :dimension_values - - sig { returns(String) } - attr_accessor :group - - # Configuration for cumulative_grouped_bulk pricing - sig do - params( - dimension_values: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue::OrHash - ], - group: String - ).returns(T.attached_class) - end - def self.new( - # Each tier lower bound must have the same group of values. - dimension_values:, - group: - ) - end - - sig do - override.returns( - { - dimension_values: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ], - group: String - } - ) - end - def to_hash - end - - class DimensionValue < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue, - Orb::Internal::AnyHash - ) - end - - # Grouping key value - sig { returns(String) } - attr_accessor :grouping_key - - # Tier lower bound - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Unit amount for this combination - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a dimension value entry - sig do - params( - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # Grouping key value - grouping_key:, - # Tier lower bound - tier_lower_bound:, - # Unit amount for this combination - unit_amount: - ) - end - - sig do - override.returns( - { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_allocation pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - ) - end - attr_reader :cumulative_grouped_allocation_config - - sig do - params( - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # The overall allocation across all groups - sig { returns(String) } - attr_accessor :cumulative_allocation - - # The allocation per individual group - sig { returns(String) } - attr_accessor :group_allocation - - # The event property used to group usage before applying allocations - sig { returns(String) } - attr_accessor :grouping_key - - # The amount to charge for each unit outside of the allocation - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for cumulative_grouped_allocation pricing - sig do - params( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations - grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: - ) - end - - sig do - override.returns( - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MinimumComposite < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for minimum_composite pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig - ) - end - attr_reader :minimum_composite_config - - sig do - params( - minimum_composite_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig::OrHash - ).void - end - attr_writer :minimum_composite_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation::OrHash - ], - minimum_composite_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for minimum_composite pricing - minimum_composite_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :minimum_composite - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ], - minimum_composite_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MinimumCompositeConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - Orb::Internal::AnyHash - ) - end - - # The minimum amount to apply - sig { returns(String) } - attr_accessor :minimum_amount - - # If true, subtotals from this price are prorated based on the service period - sig { returns(T.nilable(T::Boolean)) } - attr_reader :prorated - - sig { params(prorated: T::Boolean).void } - attr_writer :prorated - - # Configuration for minimum_composite pricing - sig do - params(minimum_amount: String, prorated: T::Boolean).returns( - T.attached_class - ) - end - def self.new( - # The minimum amount to apply - minimum_amount:, - # If true, subtotals from this price are prorated based on the service period - prorated: nil - ) - end - - sig do - override.returns( - { minimum_amount: String, prorated: T::Boolean } - ) - end - def to_hash - end - end - end - - class Percent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for percent pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig - ) - end - attr_reader :percent_config - - sig do - params( - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig::OrHash - ).void - end - attr_writer :percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation::OrHash - ], - name: String, - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for percent pricing - percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation - ], - model_type: Symbol, - name: String, - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class PercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent - - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } - def self.new( - # What percent of the component subtotals to charge - percent: - ) - end - - sig { override.returns({ percent: Float }) } - def to_hash - end - end - end - - class EventOutput < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for event_output pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig - ) - end - attr_reader :event_output_config - - sig do - params( - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for event_output pricing - event_output_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :event_output - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class EventOutputConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, - Orb::Internal::AnyHash - ) - end - - # The key in the event data to extract the unit rate from. - sig { returns(String) } - attr_accessor :unit_rating_key - - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - sig { returns(T.nilable(String)) } - attr_accessor :default_unit_rate - - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key - - # Configuration for event_output pricing - sig do - params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil - ) - end - - sig do - override.returns( - { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Variants - ] - ) - end - def self.variants - end - end - - # New plan price request body params. - module Price - extend Orb::Internal::Type::Union - - Variants = - T.type_alias do - T.any( - Orb::NewPlanUnitPrice, - Orb::NewPlanTieredPrice, - Orb::NewPlanBulkPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, - Orb::NewPlanPackagePrice, - Orb::NewPlanMatrixPrice, - Orb::NewPlanThresholdTotalAmountPrice, - Orb::NewPlanTieredPackagePrice, - Orb::NewPlanTieredWithMinimumPrice, - Orb::NewPlanGroupedTieredPrice, - Orb::NewPlanTieredPackageWithMinimumPrice, - Orb::NewPlanPackageWithAllocationPrice, - Orb::NewPlanUnitWithPercentPrice, - Orb::NewPlanMatrixWithAllocationPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, - Orb::NewPlanUnitWithProrationPrice, - Orb::NewPlanGroupedAllocationPrice, - Orb::NewPlanBulkWithProrationPrice, - Orb::NewPlanGroupedWithProratedMinimumPrice, - Orb::NewPlanGroupedWithMeteredMinimumPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, - Orb::NewPlanMatrixWithDisplayNamePrice, - Orb::NewPlanGroupedTieredPackagePrice, - Orb::NewPlanMaxGroupTieredPackagePrice, - Orb::NewPlanScalableMatrixWithUnitPricingPrice, - Orb::NewPlanScalableMatrixWithTieredPricingPrice, - Orb::NewPlanCumulativeGroupedBulkPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, - Orb::NewPlanMinimumCompositePrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput - ) - end - - class BulkWithFilters < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk_with_filters pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig - ) - end - attr_reader :bulk_with_filters_config - - sig do - params( - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void - end - attr_writer :bulk_with_filters_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_filters - ) - end - - sig do - override.returns( - { - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash - ) - end - - # Property filters to apply (all must match) - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - ) - end - attr_accessor :filters - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_filters pricing - sig do - params( - filters: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - filters: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - } - ) - end - def to_hash - end - - class Filter < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, - Orb::Internal::AnyHash - ) - end - - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match - sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params( - property_key: String, - property_value: String - ).returns(T.attached_class) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { - unit_amount: String, - tier_lower_bound: T.nilable(String) - } - ) - end - def to_hash - end - end - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, - item_id: String, - name: String, - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, - item_id: String, - model_type: Symbol, - name: String, - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params( - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - ) - end - attr_reader :grouped_with_min_max_thresholds_config - - sig do - params( - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash - ).void - end - attr_writer :grouped_with_min_max_thresholds_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_min_max_thresholds - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before applying thresholds - sig { returns(String) } - attr_accessor :grouping_key - - # The maximum amount to charge each group - sig { returns(String) } - attr_accessor :maximum_charge - - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge - - # The base price charged per group - sig { returns(String) } - attr_accessor :per_unit_rate - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before applying thresholds - grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: - ) - end - - sig do - override.returns( - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - ) - end - def to_hash - end - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_allocation pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - ) - end - attr_reader :cumulative_grouped_allocation_config - - sig do - params( - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # The overall allocation across all groups - sig { returns(String) } - attr_accessor :cumulative_allocation - - # The allocation per individual group - sig { returns(String) } - attr_accessor :group_allocation - - # The event property used to group usage before applying allocations - sig { returns(String) } - attr_accessor :grouping_key - - # The amount to charge for each unit outside of the allocation - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for cumulative_grouped_allocation pricing - sig do - params( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations - grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: - ) - end - - sig do - override.returns( - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - - class Percent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for percent pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig - ) - end - attr_reader :percent_config - - sig do - params( - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash - ).void - end - attr_writer :percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, - item_id: String, - name: String, - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # Configuration for percent pricing - percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, - item_id: String, - model_type: Symbol, - name: String, - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class PercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent - - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } - def self.new( - # What percent of the component subtotals to charge - percent: - ) - end - - sig { override.returns({ percent: Float }) } - def to_hash - end - end - end - - class EventOutput < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for event_output pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig - ) - end - attr_reader :event_output_config - - sig do - params( - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for event_output pricing - event_output_config:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :event_output - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class EventOutputConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, - Orb::Internal::AnyHash - ) - end - - # The key in the event data to extract the unit rate from. - sig { returns(String) } - attr_accessor :unit_rating_key - - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - sig { returns(T.nilable(String)) } - attr_accessor :default_unit_rate - - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key - - # Configuration for event_output pricing - sig do - params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil - ) - end - - sig do - override.returns( - { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - } - ) - end - def to_hash - end - end - end - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Variants - ] - ) - end - def self.variants - end - end - end - - class RemoveAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::RemoveAdjustment, - Orb::Internal::AnyHash - ) - end - - # The id of the adjustment to remove from on the plan. - sig { returns(String) } - attr_accessor :adjustment_id - - # The phase to remove this adjustment from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order - - sig do - params( - adjustment_id: String, - plan_phase_order: T.nilable(Integer) - ).returns(T.attached_class) - end - def self.new( - # The id of the adjustment to remove from on the plan. - adjustment_id:, - # The phase to remove this adjustment from. - plan_phase_order: nil - ) - end - - sig do - override.returns( - { adjustment_id: String, plan_phase_order: T.nilable(Integer) } - ) - end - def to_hash - end - end - - class RemovePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::RemovePrice, - Orb::Internal::AnyHash - ) - end - - # The id of the price to remove from the plan. - sig { returns(String) } - attr_accessor :price_id - - # The phase to remove this price from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order - - sig do - params( - price_id: String, - plan_phase_order: T.nilable(Integer) - ).returns(T.attached_class) - end - def self.new( - # The id of the price to remove from the plan. - price_id:, - # The phase to remove this price from. - plan_phase_order: nil - ) - end - - sig do - override.returns( - { price_id: String, plan_phase_order: T.nilable(Integer) } - ) - end - def to_hash - end - end - - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment, - Orb::Internal::AnyHash - ) - end - - # The definition of a new adjustment to create and add to the plan. - sig do - returns( - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) - ) - end - attr_accessor :adjustment - - # The id of the adjustment on the plan to replace in the plan. - sig { returns(String) } - attr_accessor :replaces_adjustment_id - - # The phase to replace this adjustment from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order - - sig do - params( - adjustment: - T.any( - Orb::NewPercentageDiscount::OrHash, - Orb::NewUsageDiscount::OrHash, - Orb::NewAmountDiscount::OrHash, - Orb::NewMinimum::OrHash, - Orb::NewMaximum::OrHash - ), - replaces_adjustment_id: String, - plan_phase_order: T.nilable(Integer) - ).returns(T.attached_class) - end - def self.new( - # The definition of a new adjustment to create and add to the plan. - adjustment:, - # The id of the adjustment on the plan to replace in the plan. - replaces_adjustment_id:, - # The phase to replace this adjustment from. - plan_phase_order: nil - ) - end - - sig do - override.returns( - { - adjustment: - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ), - replaces_adjustment_id: String, - plan_phase_order: T.nilable(Integer) - } - ) - end - def to_hash - end - - # The definition of a new adjustment to create and add to the plan. - module Adjustment - extend Orb::Internal::Type::Union - - Variants = - T.type_alias do - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) - end - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Variants - ] - ) - end - def self.variants - end - end - end - - class ReplacePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice, - Orb::Internal::AnyHash - ) - end - - # The id of the price on the plan to replace in the plan. - sig { returns(String) } - attr_accessor :replaces_price_id - - # The allocation price to add to the plan. - sig { returns(T.nilable(Orb::NewAllocationPrice)) } - attr_reader :allocation_price - - sig do - params( - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) - ).void - end - attr_writer :allocation_price - - # The license allocation price to add to the plan. - sig do - returns( - T.nilable( - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput - ) - ) - ) - end - attr_accessor :license_allocation_price - - # The phase to replace this price from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order - - # New plan price request body params. - sig do - returns( - T.nilable( - T.any( - Orb::NewPlanUnitPrice, - Orb::NewPlanTieredPrice, - Orb::NewPlanBulkPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewPlanPackagePrice, - Orb::NewPlanMatrixPrice, - Orb::NewPlanThresholdTotalAmountPrice, - Orb::NewPlanTieredPackagePrice, - Orb::NewPlanTieredWithMinimumPrice, - Orb::NewPlanGroupedTieredPrice, - Orb::NewPlanTieredPackageWithMinimumPrice, - Orb::NewPlanPackageWithAllocationPrice, - Orb::NewPlanUnitWithPercentPrice, - Orb::NewPlanMatrixWithAllocationPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, - Orb::NewPlanUnitWithProrationPrice, - Orb::NewPlanGroupedAllocationPrice, - Orb::NewPlanBulkWithProrationPrice, - Orb::NewPlanGroupedWithProratedMinimumPrice, - Orb::NewPlanGroupedWithMeteredMinimumPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewPlanMatrixWithDisplayNamePrice, - Orb::NewPlanGroupedTieredPackagePrice, - Orb::NewPlanMaxGroupTieredPackagePrice, - Orb::NewPlanScalableMatrixWithUnitPricingPrice, - Orb::NewPlanScalableMatrixWithTieredPricingPrice, - Orb::NewPlanCumulativeGroupedBulkPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::NewPlanMinimumCompositePrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput - ) - ) - ) - end - attr_accessor :price - - sig do - params( - replaces_price_id: String, - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), - license_allocation_price: - T.nilable( - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::OrHash - ) - ), - plan_phase_order: T.nilable(Integer), - price: - T.nilable( - T.any( - Orb::NewPlanUnitPrice::OrHash, - Orb::NewPlanTieredPrice::OrHash, - Orb::NewPlanBulkPrice::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::OrHash, - Orb::NewPlanPackagePrice::OrHash, - Orb::NewPlanMatrixPrice::OrHash, - Orb::NewPlanThresholdTotalAmountPrice::OrHash, - Orb::NewPlanTieredPackagePrice::OrHash, - Orb::NewPlanTieredWithMinimumPrice::OrHash, - Orb::NewPlanGroupedTieredPrice::OrHash, - Orb::NewPlanTieredPackageWithMinimumPrice::OrHash, - Orb::NewPlanPackageWithAllocationPrice::OrHash, - Orb::NewPlanUnitWithPercentPrice::OrHash, - Orb::NewPlanMatrixWithAllocationPrice::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::OrHash, - Orb::NewPlanUnitWithProrationPrice::OrHash, - Orb::NewPlanGroupedAllocationPrice::OrHash, - Orb::NewPlanBulkWithProrationPrice::OrHash, - Orb::NewPlanGroupedWithProratedMinimumPrice::OrHash, - Orb::NewPlanGroupedWithMeteredMinimumPrice::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::OrHash, - Orb::NewPlanMatrixWithDisplayNamePrice::OrHash, - Orb::NewPlanGroupedTieredPackagePrice::OrHash, - Orb::NewPlanMaxGroupTieredPackagePrice::OrHash, - Orb::NewPlanScalableMatrixWithUnitPricingPrice::OrHash, - Orb::NewPlanScalableMatrixWithTieredPricingPrice::OrHash, - Orb::NewPlanCumulativeGroupedBulkPrice::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::OrHash, - Orb::NewPlanMinimumCompositePrice::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent::OrHash, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput::OrHash - ) - ) - ).returns(T.attached_class) - end - def self.new( - # The id of the price on the plan to replace in the plan. - replaces_price_id:, - # The allocation price to add to the plan. - allocation_price: nil, - # The license allocation price to add to the plan. - license_allocation_price: nil, - # The phase to replace this price from. - plan_phase_order: nil, - # New plan price request body params. - price: nil - ) - end - - sig do - override.returns( - { - replaces_price_id: String, - allocation_price: T.nilable(Orb::NewAllocationPrice), - license_allocation_price: - T.nilable( - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput - ) - ), - plan_phase_order: T.nilable(Integer), - price: - T.nilable( - T.any( - Orb::NewPlanUnitPrice, - Orb::NewPlanTieredPrice, - Orb::NewPlanBulkPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewPlanPackagePrice, - Orb::NewPlanMatrixPrice, - Orb::NewPlanThresholdTotalAmountPrice, - Orb::NewPlanTieredPackagePrice, - Orb::NewPlanTieredWithMinimumPrice, - Orb::NewPlanGroupedTieredPrice, - Orb::NewPlanTieredPackageWithMinimumPrice, - Orb::NewPlanPackageWithAllocationPrice, - Orb::NewPlanUnitWithPercentPrice, - Orb::NewPlanMatrixWithAllocationPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, - Orb::NewPlanUnitWithProrationPrice, - Orb::NewPlanGroupedAllocationPrice, - Orb::NewPlanBulkWithProrationPrice, - Orb::NewPlanGroupedWithProratedMinimumPrice, - Orb::NewPlanGroupedWithMeteredMinimumPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewPlanMatrixWithDisplayNamePrice, - Orb::NewPlanGroupedTieredPackagePrice, - Orb::NewPlanMaxGroupTieredPackagePrice, - Orb::NewPlanScalableMatrixWithUnitPricingPrice, - Orb::NewPlanScalableMatrixWithTieredPricingPrice, - Orb::NewPlanCumulativeGroupedBulkPrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::NewPlanMinimumCompositePrice, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput - ) - ) - } - ) - end - def to_hash - end - - # The license allocation price to add to the plan. - module LicenseAllocationPrice - extend Orb::Internal::Type::Union - - Variants = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput - ) - end - - class Unit < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit pricing - sig { returns(Orb::UnitConfig) } - attr_reader :unit_config - - sig { params(unit_config: Orb::UnitConfig::OrHash).void } - attr_writer :unit_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation::OrHash - ], - name: String, - unit_config: Orb::UnitConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit pricing - unit_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_config: Orb::UnitConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class Tiered < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered pricing - sig { returns(Orb::TieredConfig) } - attr_reader :tiered_config - - sig { params(tiered_config: Orb::TieredConfig::OrHash).void } - attr_writer :tiered_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation::OrHash - ], - name: String, - tiered_config: Orb::TieredConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered pricing - tiered_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_config: Orb::TieredConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class Bulk < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk pricing - sig { returns(Orb::BulkConfig) } - attr_reader :bulk_config - - sig { params(bulk_config: Orb::BulkConfig::OrHash).void } - attr_writer :bulk_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_config: Orb::BulkConfig::OrHash, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk pricing - bulk_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk - ) - end - - sig do - override.returns( - { - bulk_config: Orb::BulkConfig, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class BulkWithFilters < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk_with_filters pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig - ) - end - attr_reader :bulk_with_filters_config - - sig do - params( - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void - end - attr_writer :bulk_with_filters_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_filters - ) - end - - sig do - override.returns( - { - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash - ) - end - - # Property filters to apply (all must match) - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - ) - end - attr_accessor :filters - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_filters pricing - sig do - params( - filters: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - filters: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - } - ) - end - def to_hash - end - - class Filter < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter, - Orb::Internal::AnyHash - ) - end - - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match - sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params( - property_key: String, - property_value: String - ).returns(T.attached_class) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { - unit_amount: String, - tier_lower_bound: T.nilable(String) - } - ) - end - def to_hash - end - end - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class Package < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for package pricing - sig { returns(Orb::PackageConfig) } - attr_reader :package_config - - sig { params(package_config: Orb::PackageConfig::OrHash).void } - attr_writer :package_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation::OrHash - ], - name: String, - package_config: Orb::PackageConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for package pricing - package_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :package - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation - ], - model_type: Symbol, - name: String, - package_config: Orb::PackageConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class Matrix < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix pricing - sig { returns(Orb::MatrixConfig) } - attr_reader :matrix_config - - sig { params(matrix_config: Orb::MatrixConfig::OrHash).void } - attr_writer :matrix_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation::OrHash - ], - matrix_config: Orb::MatrixConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix pricing - matrix_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation - ], - matrix_config: Orb::MatrixConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for threshold_total_amount pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig - ) - end - attr_reader :threshold_total_amount_config - - sig do - params( - threshold_total_amount_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::OrHash - ).void - end - attr_writer :threshold_total_amount_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation::OrHash - ], - name: String, - threshold_total_amount_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for threshold_total_amount pricing - threshold_total_amount_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :threshold_total_amount - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ], - model_type: Symbol, - name: String, - threshold_total_amount_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - Orb::Internal::AnyHash - ) - end - - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ] - ) - end - attr_accessor :consumption_table - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :prorate - - # Configuration for threshold_total_amount pricing - sig do - params( - consumption_table: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable::OrHash - ], - prorate: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - consumption_table:, - # If true, the unit price will be prorated to the billing period - prorate: nil - ) - end - - sig do - override.returns( - { - consumption_table: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ], - prorate: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - - class ConsumptionTable < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :threshold - - # Total amount for this threshold - sig { returns(String) } - attr_accessor :total_amount - - # Configuration for a single threshold - sig do - params(threshold: String, total_amount: String).returns( - T.attached_class - ) - end - def self.new( - threshold:, - # Total amount for this threshold - total_amount: - ) - end - - sig do - override.returns( - { threshold: String, total_amount: String } - ) - end - def to_hash - end - end - end - end - - class TieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_package pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig - ) - end - attr_reader :tiered_package_config - - sig do - params( - tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::OrHash - ).void - end - attr_writer :tiered_package_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation::OrHash - ], - name: String, - tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_package pricing - tiered_package_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_package pricing - sig do - params( - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - tiers: - ) - end - - sig do - override.returns( - { - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Price per package - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier with business logic - sig do - params(per_unit: String, tier_lower_bound: String).returns( - T.attached_class - ) - end - def self.new( - # Price per package - per_unit:, - tier_lower_bound: - ) - end - - sig do - override.returns( - { per_unit: String, tier_lower_bound: String } - ) - end - def to_hash - end - end - end - end - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_minimum pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig - ) - end - attr_reader :tiered_with_minimum_config - - sig do - params( - tiered_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::OrHash - ).void - end - attr_writer :tiered_with_minimum_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation::OrHash - ], - name: String, - tiered_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_with_minimum pricing - tiered_with_minimum_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ] - ) - end - attr_accessor :tiers - - # If true, tiers with an accrued amount of 0 will not be included in the rating. - sig { returns(T.nilable(T::Boolean)) } - attr_reader :hide_zero_amount_tiers - - sig { params(hide_zero_amount_tiers: T::Boolean).void } - attr_writer :hide_zero_amount_tiers - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_reader :prorate - - sig { params(prorate: T::Boolean).void } - attr_writer :prorate - - # Configuration for tiered_with_minimum pricing - sig do - params( - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier::OrHash - ], - hide_zero_amount_tiers: T::Boolean, - prorate: T::Boolean - ).returns(T.attached_class) - end - def self.new( - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - tiers:, - # If true, tiers with an accrued amount of 0 will not be included in the rating. - hide_zero_amount_tiers: nil, - # If true, the unit price will be prorated to the billing period - prorate: nil - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ], - hide_zero_amount_tiers: T::Boolean, - prorate: T::Boolean - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :minimum_amount - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params( - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - minimum_amount:, - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - end - - class GroupedTiered < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_tiered pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig - ) - end - attr_reader :grouped_tiered_config - - sig do - params( - grouped_tiered_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::OrHash - ).void - end - attr_writer :grouped_tiered_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol, - grouped_tiered_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_tiered pricing - grouped_tiered_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_tiered - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol, - grouped_tiered_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - Orb::Internal::AnyHash - ) - end - - # The billable metric property used to group before tiering - sig { returns(String) } - attr_accessor :grouping_key - - # Apply tiered pricing to each segment generated after grouping with the provided - # key - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for grouped_tiered pricing - sig do - params( - grouping_key: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The billable metric property used to group before tiering - grouping_key:, - # Apply tiered pricing to each segment generated after grouping with the provided - # key - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params( - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_package_with_minimum pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig - ) - end - attr_reader :tiered_package_with_minimum_config - - sig do - params( - tiered_package_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::OrHash - ).void - end - attr_writer :tiered_package_with_minimum_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation::OrHash - ], - name: String, - tiered_package_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_package_with_minimum pricing - tiered_package_with_minimum_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_package_with_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_package_with_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(Float) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_package_with_minimum pricing - sig do - params( - package_size: Float, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - tiers: - ) - end - - sig do - override.returns( - { - package_size: Float, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :minimum_amount - - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier - sig do - params( - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - ).returns(T.attached_class) - end - def self.new(minimum_amount:, per_unit:, tier_lower_bound:) - end - - sig do - override.returns( - { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - ) - end - def to_hash - end - end - end - end - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for package_with_allocation pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig - ) - end - attr_reader :package_with_allocation_config - - sig do - params( - package_with_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig::OrHash - ).void - end - attr_writer :package_with_allocation_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation::OrHash - ], - name: String, - package_with_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for package_with_allocation pricing - package_with_allocation_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :package_with_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - package_with_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :allocation - - sig { returns(String) } - attr_accessor :package_amount - - sig { returns(String) } - attr_accessor :package_size - - # Configuration for package_with_allocation pricing - sig do - params( - allocation: String, - package_amount: String, - package_size: String - ).returns(T.attached_class) - end - def self.new(allocation:, package_amount:, package_size:) - end - - sig do - override.returns( - { - allocation: String, - package_amount: String, - package_size: String - } - ) - end - def to_hash - end - end - end - - class UnitWithPercent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit_with_percent pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig - ) - end - attr_reader :unit_with_percent_config - - sig do - params( - unit_with_percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig::OrHash - ).void - end - attr_writer :unit_with_percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation::OrHash - ], - name: String, - unit_with_percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit_with_percent pricing - unit_with_percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit_with_percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_with_percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent, out of 100, of the calculated total to charge - sig { returns(String) } - attr_accessor :percent - - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for unit_with_percent pricing - sig do - params(percent: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # What percent, out of 100, of the calculated total to charge - percent:, - # Rate per unit of usage - unit_amount: - ) - end - - sig do - override.returns({ percent: String, unit_amount: String }) - end - def to_hash - end - end - end - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix_with_allocation pricing - sig { returns(Orb::MatrixWithAllocationConfig) } - attr_reader :matrix_with_allocation_config - - sig do - params( - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash - ).void - end - attr_writer :matrix_with_allocation_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation::OrHash - ], - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix_with_allocation pricing - matrix_with_allocation_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix_with_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ], - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation::OrHash - ], - name: String, - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params( - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class UnitWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit_with_proration pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig - ) - end - attr_reader :unit_with_proration_config - - sig do - params( - unit_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig::OrHash - ).void - end - attr_writer :unit_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation::OrHash - ], - name: String, - unit_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit_with_proration pricing - unit_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for unit_with_proration pricing - sig { params(unit_amount: String).returns(T.attached_class) } - def self.new( - # Rate per unit of usage - unit_amount: - ) - end - - sig { override.returns({ unit_amount: String }) } - def to_hash - end - end - end - - class GroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_allocation pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig - ) - end - attr_reader :grouped_allocation_config - - sig do - params( - grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig::OrHash - ).void - end - attr_writer :grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol, - grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_allocation pricing - grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol, - grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # Usage allocation per group - sig { returns(String) } - attr_accessor :allocation - - # How to determine the groups that should each be allocated some quantity - sig { returns(String) } - attr_accessor :grouping_key - - # Unit rate for post-allocation - sig { returns(String) } - attr_accessor :overage_unit_rate - - # Configuration for grouped_allocation pricing - sig do - params( - allocation: String, - grouping_key: String, - overage_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # Usage allocation per group - allocation:, - # How to determine the groups that should each be allocated some quantity - grouping_key:, - # Unit rate for post-allocation - overage_unit_rate: - ) - end - - sig do - override.returns( - { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class BulkWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk_with_proration pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig - ) - end - attr_reader :bulk_with_proration_config - - sig do - params( - bulk_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::OrHash - ).void - end - attr_writer :bulk_with_proration_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::OrHash, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk_with_proration pricing - bulk_with_proration_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_proration - ) - end - - sig do - override.returns( - { - bulk_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Cost per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier with proration - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Cost per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { - unit_amount: String, - tier_lower_bound: T.nilable(String) - } - ) - end - def to_hash - end - end - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_prorated_minimum pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig - ) - end - attr_reader :grouped_with_prorated_minimum_config - - sig do - params( - grouped_with_prorated_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_prorated_minimum_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol, - grouped_with_prorated_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_prorated_minimum pricing - grouped_with_prorated_minimum_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_prorated_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol, - grouped_with_prorated_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # How to determine the groups that should each have a minimum - sig { returns(String) } - attr_accessor :grouping_key - - # The minimum amount to charge per group - sig { returns(String) } - attr_accessor :minimum - - # The amount to charge per unit - sig { returns(String) } - attr_accessor :unit_rate - - # Configuration for grouped_with_prorated_minimum pricing - sig do - params( - grouping_key: String, - minimum: String, - unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # How to determine the groups that should each have a minimum - grouping_key:, - # The minimum amount to charge per group - minimum:, - # The amount to charge per unit - unit_rate: - ) - end - - sig do - override.returns( - { grouping_key: String, minimum: String, unit_rate: String } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_metered_minimum pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig - ) - end - attr_reader :grouped_with_metered_minimum_config - - sig do - params( - grouped_with_metered_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_metered_minimum_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol, - grouped_with_metered_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_metered_minimum pricing - grouped_with_metered_minimum_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_metered_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol, - grouped_with_metered_minimum_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - sig { returns(String) } - attr_accessor :grouping_key - - # The minimum amount to charge per group per unit - sig { returns(String) } - attr_accessor :minimum_unit_amount - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :pricing_key - - # Scale the unit rates by the scaling factor. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ] - ) - end - attr_accessor :scaling_factors - - # Used to determine the unit rate scaling factor - sig { returns(String) } - attr_accessor :scaling_key - - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts - - # Configuration for grouped_with_metered_minimum pricing - sig do - params( - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor::OrHash - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - grouping_key:, - # The minimum amount to charge per group per unit - minimum_unit_amount:, - # Used to determine the unit rate - pricing_key:, - # Scale the unit rates by the scaling factor. - scaling_factors:, - # Used to determine the unit rate scaling factor - scaling_key:, - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - unit_amounts: - ) - end - - sig do - override.returns( - { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - } - ) - end - def to_hash - end - - class ScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(String) } - attr_accessor :scaling_value - - # Configuration for a scaling factor - sig do - params( - scaling_factor: String, - scaling_value: String - ).returns(T.attached_class) - end - def self.new(scaling_factor:, scaling_value:) - end - - sig do - override.returns( - { scaling_factor: String, scaling_value: String } - ) - end - def to_hash - end - end - - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :pricing_value - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a unit amount - sig do - params(pricing_value: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - pricing_value:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { pricing_value: String, unit_amount: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - ) - end - attr_reader :grouped_with_min_max_thresholds_config - - sig do - params( - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash - ).void - end - attr_writer :grouped_with_min_max_thresholds_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_min_max_thresholds - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before applying thresholds - sig { returns(String) } - attr_accessor :grouping_key - - # The maximum amount to charge each group - sig { returns(String) } - attr_accessor :maximum_charge - - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge - - # The base price charged per group - sig { returns(String) } - attr_accessor :per_unit_rate - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before applying thresholds - grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: - ) - end - - sig do - override.returns( - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix_with_display_name pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig - ) - end - attr_reader :matrix_with_display_name_config - - sig do - params( - matrix_with_display_name_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash - ).void - end - attr_writer :matrix_with_display_name_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation::OrHash - ], - matrix_with_display_name_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix_with_display_name pricing - matrix_with_display_name_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix_with_display_name - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ], - matrix_with_display_name_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - Orb::Internal::AnyHash - ) - end - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :dimension - - # Apply per unit pricing to each dimension value - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts - - # Configuration for matrix_with_display_name pricing - sig do - params( - dimension: String, - unit_amounts: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Used to determine the unit rate - dimension:, - # Apply per unit pricing to each dimension value - unit_amounts: - ) - end - - sig do - override.returns( - { - dimension: String, - unit_amounts: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - } - ) - end - def to_hash - end - - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount, - Orb::Internal::AnyHash - ) - end - - # The dimension value - sig { returns(String) } - attr_accessor :dimension_value - - # Display name for this dimension value - sig { returns(String) } - attr_accessor :display_name - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a unit amount item - sig do - params( - dimension_value: String, - display_name: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The dimension value - dimension_value:, - # Display name for this dimension value - display_name:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { - dimension_value: String, - display_name: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - end - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_tiered_package pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig - ) - end - attr_reader :grouped_tiered_package_config - - sig do - params( - grouped_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash - ).void - end - attr_writer :grouped_tiered_package_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol, - grouped_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_tiered_package pricing - grouped_tiered_package_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol, - grouped_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before tiering - sig { returns(String) } - attr_accessor :grouping_key - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for grouped_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before tiering - grouping_key:, - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Per package - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier - sig do - params(per_unit: String, tier_lower_bound: String).returns( - T.attached_class - ) - end - def self.new( - # Per package - per_unit:, - tier_lower_bound: - ) - end - - sig do - override.returns( - { per_unit: String, tier_lower_bound: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for max_group_tiered_package pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig - ) - end - attr_reader :max_group_tiered_package_config - - sig do - params( - max_group_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash - ).void - end - attr_writer :max_group_tiered_package_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation::OrHash - ], - max_group_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for max_group_tiered_package pricing - max_group_tiered_package_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :max_group_tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ], - max_group_tiered_package_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before tiering the group with the highest value - sig { returns(String) } - attr_accessor :grouping_key - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing to the largest group after grouping with the provided key. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for max_group_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before tiering the group with the highest value - grouping_key:, - package_size:, - # Apply tiered pricing to the largest group after grouping with the provided key. - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params( - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig - ) - end - attr_reader :scalable_matrix_with_unit_pricing_config - - sig do - params( - scalable_matrix_with_unit_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_unit_pricing_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation::OrHash - ], - name: String, - scalable_matrix_with_unit_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for scalable_matrix_with_unit_pricing pricing - scalable_matrix_with_unit_pricing_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :scalable_matrix_with_unit_pricing - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ], - model_type: Symbol, - name: String, - scalable_matrix_with_unit_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - Orb::Internal::AnyHash - ) - end - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :first_dimension - - # Apply a scaling factor to each dimension - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors - - # The final unit price to rate against the output of the matrix - sig { returns(String) } - attr_accessor :unit_price - - # The property used to group this price - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :prorate - - # Used to determine the unit rate (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension - - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor::OrHash - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Used to determine the unit rate - first_dimension:, - # Apply a scaling factor to each dimension - matrix_scaling_factors:, - # The final unit price to rate against the output of the matrix - unit_price:, - # The property used to group this price - grouping_key: nil, - # If true, the unit price will be prorated to the billing period - prorate: nil, - # Used to determine the unit rate (optional) - second_dimension: nil - ) - end - - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) - } - ) - end - def to_hash - end - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :first_dimension_value - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value - - # Configuration for a single matrix scaling factor - sig do - params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil - ) - end - - sig do - override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } - ) - end - def to_hash - end - end - end - end - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig - ) - end - attr_reader :scalable_matrix_with_tiered_pricing_config - - sig do - params( - scalable_matrix_with_tiered_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_tiered_pricing_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation::OrHash - ], - name: String, - scalable_matrix_with_tiered_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for scalable_matrix_with_tiered_pricing pricing - scalable_matrix_with_tiered_pricing_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :scalable_matrix_with_tiered_pricing - ) - end - - sig do - override.returns( - { - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ], - model_type: Symbol, - name: String, - scalable_matrix_with_tiered_pricing_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - Orb::Internal::AnyHash - ) - end - - # Used for the scalable matrix first dimension - sig { returns(String) } - attr_accessor :first_dimension - - # Apply a scaling factor to each dimension - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors - - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Used for the scalable matrix second dimension (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension - - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor::OrHash - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier::OrHash - ], - second_dimension: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Used for the scalable matrix first dimension - first_dimension:, - # Apply a scaling factor to each dimension - matrix_scaling_factors:, - tiers:, - # Used for the scalable matrix second dimension (optional) - second_dimension: nil - ) - end - - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ], - second_dimension: T.nilable(String) - } - ) - end - def to_hash - end - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :first_dimension_value - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value - - # Configuration for a single matrix scaling factor - sig do - params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil - ) - end - - sig do - override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier entry with business logic - sig do - params( - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new(tier_lower_bound:, unit_amount:) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_bulk pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig - ) - end - attr_reader :cumulative_grouped_bulk_config - - sig do - params( - cumulative_grouped_bulk_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_bulk_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol, - cumulative_grouped_bulk_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_bulk pricing - cumulative_grouped_bulk_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_bulk + sig do + params( + allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) + ).void + end + attr_writer :allocation_price + + # The license allocation price to add to the plan. + sig do + returns( + T.nilable( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice ) - end + ) + end + attr_reader :license_allocation_price - 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) - } + sig do + params( + license_allocation_price: + T.nilable( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::OrHash ) - end - def to_hash - end + ).void + end + attr_writer :license_allocation_price - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum + # The phase to replace this price from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # 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::MatrixWithThresholdDiscounts, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, + Orb::NewPlanUnitWithProrationPrice, + Orb::NewPlanGroupedAllocationPrice, + Orb::NewPlanBulkWithProrationPrice, + Orb::NewPlanGroupedWithProratedMinimumPrice, + Orb::NewPlanGroupedWithMeteredMinimumPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewPlanMatrixWithDisplayNamePrice, + Orb::NewPlanGroupedTieredPackagePrice, + Orb::NewPlanMaxGroupTieredPackagePrice, + Orb::NewPlanScalableMatrixWithUnitPricingPrice, + Orb::NewPlanScalableMatrixWithTieredPricingPrice, + Orb::NewPlanCumulativeGroupedBulkPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewPlanMinimumCompositePrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput + ) + ) + ) + end + attr_accessor :price - 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 + sig do + params( + replaces_price_id: String, + allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), + license_allocation_price: + T.nilable( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::OrHash + ), + plan_phase_order: T.nilable(Integer), + price: + T.nilable( + T.any( + Orb::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::MatrixWithThresholdDiscounts::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::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::OrHash, + Orb::NewPlanMinimumCompositePrice::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput::OrHash ) - CUSTOM = - T.let( - :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol + ) + ).returns(T.attached_class) + end + def self.new( + # The id of the price on the plan to replace in the plan. + replaces_price_id:, + # The allocation price to add to the plan. + allocation_price: nil, + # The license allocation price to add to the plan. + license_allocation_price: nil, + # The phase to replace this price from. + plan_phase_order: nil, + # New plan price request body params. + price: nil + ) + end + + sig do + override.returns( + { + replaces_price_id: String, + allocation_price: T.nilable(Orb::NewAllocationPrice), + license_allocation_price: + T.nilable( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice + ), + plan_phase_order: T.nilable(Integer), + price: + T.nilable( + T.any( + Orb::NewPlanUnitPrice, + Orb::NewPlanTieredPrice, + Orb::NewPlanBulkPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewPlanPackagePrice, + Orb::NewPlanMatrixPrice, + Orb::NewPlanThresholdTotalAmountPrice, + Orb::NewPlanTieredPackagePrice, + Orb::NewPlanTieredWithMinimumPrice, + Orb::NewPlanGroupedTieredPrice, + Orb::NewPlanTieredPackageWithMinimumPrice, + Orb::NewPlanPackageWithAllocationPrice, + Orb::NewPlanUnitWithPercentPrice, + Orb::NewPlanMatrixWithAllocationPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, + Orb::NewPlanUnitWithProrationPrice, + Orb::NewPlanGroupedAllocationPrice, + Orb::NewPlanBulkWithProrationPrice, + Orb::NewPlanGroupedWithProratedMinimumPrice, + Orb::NewPlanGroupedWithMeteredMinimumPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewPlanMatrixWithDisplayNamePrice, + Orb::NewPlanGroupedTieredPackagePrice, + Orb::NewPlanMaxGroupTieredPackagePrice, + Orb::NewPlanScalableMatrixWithUnitPricingPrice, + Orb::NewPlanScalableMatrixWithTieredPricingPrice, + Orb::NewPlanCumulativeGroupedBulkPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewPlanMinimumCompositePrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput + ) ) + } + ) + end + def to_hash + end - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ] - ) - end - def self.values - end + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice, + Orb::Internal::AnyHash + ) 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 + # The cadence to bill for this price on. + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol + ) + end + attr_accessor :cadence - # 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 + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id - sig { returns(String) } - attr_accessor :group + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation + ] + ) + end + attr_accessor :license_allocations - # 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 + # The pricing model type + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol + ) + end + attr_accessor :model_type - sig do - override.returns( - { - dimension_values: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ], - group: String - } - ) - end - def to_hash - end + # The name of the price. + sig { returns(String) } + attr_accessor :name - 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 + # Configuration for unit pricing + sig { returns(Orb::UnitConfig) } + attr_reader :unit_config - # Grouping key value - sig { returns(String) } - attr_accessor :grouping_key + sig { params(unit_config: Orb::UnitConfig::OrHash).void } + attr_writer :unit_config - # Tier lower bound - sig { returns(String) } - attr_accessor :tier_lower_bound + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id - # Unit amount for this combination - sig { returns(String) } - attr_accessor :unit_amount + # If the Price represents a fixed cost, the price will be billed 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 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: + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig ) - end + ) + ) + end + attr_accessor :conversion_rate_config - sig do - override.returns( - { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation, - Orb::Internal::AnyHash - ) - end + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Internal::AnyHash - ) - end + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration - # The cadence to bill for this price on. - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id - # Configuration for cumulative_grouped_allocation pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - ) - end - attr_reader :cumulative_grouped_allocation_config + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the 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( - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_allocation_config + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + # The license allocation price to add to the plan. + sig do + params( + cadence: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol, + item_id: String, + license_allocations: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation::OrHash + ], + model_type: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol, + name: String, + unit_config: Orb::UnitConfig::OrHash, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - + item_id:, # License allocations to associate with this price. Each entry defines a # 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 - + license_allocations:, # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - + model_type:, # The name of the price. - sig { returns(String) } - attr_accessor :name - + name:, + # Configuration for unit pricing + unit_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - + billable_metric_id: nil, # If the Price represents a fixed cost, the price will be billed in-advance if # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - + billed_in_advance: nil, # For custom cadence: specifies the duration of the billing period in days or # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - + billing_cycle_configuration: nil, # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - + conversion_rate: nil, # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - + conversion_rate_config: nil, # An ISO 4217 currency string, or custom pricing unit identifier, in which this # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - + currency: nil, # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - + dimensional_price_configuration: nil, # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - + external_price_id: nil, # If the Price represents a fixed cost, this represents the quantity of units # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - + fixed_price_quantity: nil, # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - + invoice_grouping_key: nil, # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - + invoicing_cycle_configuration: nil, # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - + license_type_id: nil, # User-specified key/value pairs for the resource. Individual keys can be removed # by setting the value to `null`, and the entire metadata mapping can be cleared # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - + metadata: nil, # A transient ID that can be used to reference this price when adding adjustments # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id + reference_id: nil + ) + end - sig do - params( + sig do + override.returns( + { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol, item_id: String, license_allocations: T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation::OrHash + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation ], + model_type: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol, name: String, + unit_config: Orb::UnitConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + T.nilable(Orb::NewBillingCycleConfiguration), conversion_rate: T.nilable(Float), conversion_rate_config: T.nilable( T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig ) ), currency: T.nilable(String), dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + T.nilable(Orb::NewDimensionalPriceConfiguration), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + T.nilable(Orb::NewBillingCycleConfiguration), license_type_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # 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 + reference_id: T.nilable(String) + } ) - end + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) 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) - } + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ] ) end - def to_hash + def self.values end + end - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::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 - ] + class LicenseAllocation < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation, + Orb::Internal::AnyHash ) 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 of credits granted per active license per cadence. + sig { returns(String) } + attr_accessor :amount - # The amount to charge for each unit outside of the allocation - sig { returns(String) } - attr_accessor :unit_amount + # The currency of the license allocation. + sig { returns(String) } + attr_accessor :currency - # 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 + # When True, overage beyond the allocation is written off. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :write_off_overage - sig do - override.returns( - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - ) - end - def to_hash - end + sig do + params( + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) + ).returns(T.attached_class) 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 - + def self.new( # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - + amount:, # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - + currency:, # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + write_off_overage: nil + ) + end - sig do - params( + sig do + override.returns( + { amount: String, currency: String, write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + } ) - end + end + def to_hash + end + end - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } + # The pricing model type + module ModelType + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType ) end - def to_hash - end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNIT = + T.let( + :unit, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ] + ) + end + def self.values end end + end + + # New plan price request body params. + module Price + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewPlanUnitPrice, + Orb::NewPlanTieredPrice, + Orb::NewPlanBulkPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewPlanPackagePrice, + Orb::NewPlanMatrixPrice, + Orb::NewPlanThresholdTotalAmountPrice, + Orb::NewPlanTieredPackagePrice, + Orb::NewPlanTieredWithMinimumPrice, + Orb::NewPlanGroupedTieredPrice, + Orb::NewPlanTieredPackageWithMinimumPrice, + Orb::NewPlanPackageWithAllocationPrice, + Orb::NewPlanUnitWithPercentPrice, + Orb::NewPlanMatrixWithAllocationPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, + Orb::NewPlanUnitWithProrationPrice, + Orb::NewPlanGroupedAllocationPrice, + Orb::NewPlanBulkWithProrationPrice, + Orb::NewPlanGroupedWithProratedMinimumPrice, + Orb::NewPlanGroupedWithMeteredMinimumPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewPlanMatrixWithDisplayNamePrice, + Orb::NewPlanGroupedTieredPackagePrice, + Orb::NewPlanMaxGroupTieredPackagePrice, + Orb::NewPlanScalableMatrixWithUnitPricingPrice, + Orb::NewPlanScalableMatrixWithTieredPricingPrice, + Orb::NewPlanCumulativeGroupedBulkPrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewPlanMinimumCompositePrice, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput + ) + end - class MinimumComposite < Orb::Internal::Type::BaseModel + class BulkWithFilters < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Internal::AnyHash ) end - # The cadence to bill for this price on. + # Configuration for bulk_with_filters pricing sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig ) end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + attr_reader :bulk_with_filters_config - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ] - ) + params( + bulk_with_filters_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash + ).void end - attr_accessor :license_allocations + attr_writer :bulk_with_filters_config - # Configuration for minimum_composite pricing + # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol ) end - attr_reader :minimum_composite_config + attr_accessor :cadence - sig do - params( - minimum_composite_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig::OrHash - ).void - end - attr_writer :minimum_composite_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) } @@ -31357,15 +5791,11 @@ module Orb sig do params( + bulk_with_filters_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::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), @@ -31394,16 +5824,12 @@ module Orb ).returns(T.attached_class) end def self.new( + # Configuration for bulk_with_filters pricing + bulk_with_filters_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. 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 @@ -31444,22 +5870,18 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :minimum_composite + model_type: :bulk_with_filters ) end sig do override.returns( { + bulk_with_filters_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::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), @@ -31491,6 +5913,159 @@ module Orb def to_hash end + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::Internal::AnyHash + ) + end + + # Property filters to apply (all must match) + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ] + ) + end + attr_accessor :filters + + # Bulk tiers for rating based on total usage volume + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + ) + end + attr_accessor :tiers + + # Configuration for bulk_with_filters pricing + sig do + params( + filters: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash + ], + tiers: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Property filters to apply (all must match) + filters:, + # Bulk tiers for rating based on total usage volume + tiers: + ) + end + + sig do + override.returns( + { + filters: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ], + tiers: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + } + ) + end + def to_hash + end + + class Filter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::Internal::AnyHash + ) + end + + # Event property key to filter on + sig { returns(String) } + attr_accessor :property_key + + # Event property value to match + sig { returns(String) } + attr_accessor :property_value + + # Configuration for a single property filter + sig do + params( + property_key: String, + property_value: String + ).returns(T.attached_class) + end + def self.new( + # Event property key to filter on + property_key:, + # Event property value to match + property_value: + ) + end + + sig do + override.returns( + { property_key: String, property_value: String } + ) + end + def to_hash + end + end + + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, + Orb::Internal::AnyHash + ) + end + + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount + + # The lower bound for this tier + sig { returns(T.nilable(String)) } + attr_accessor :tier_lower_bound + + # 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 @@ -31499,7 +6074,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -31507,145 +6082,51 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::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::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 + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Internal::AnyHash ) end @@ -31653,7 +6134,7 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol ) end attr_accessor :cadence @@ -31662,17 +6143,21 @@ 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. + # Configuration for matrix_with_threshold_discounts pricing sig do returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation - ] + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig ) end - attr_accessor :license_allocations + attr_reader :matrix_with_threshold_discounts_config + + sig do + params( + matrix_with_threshold_discounts_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash + ).void + end + attr_writer :matrix_with_threshold_discounts_config # The pricing model type sig { returns(Symbol) } @@ -31682,22 +6167,6 @@ module Orb 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)) } @@ -31799,15 +6268,11 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation::OrHash - ], + matrix_with_threshold_discounts_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::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: @@ -31839,14 +6304,10 @@ module Orb cadence:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, + # Configuration for matrix_with_threshold_discounts pricing + matrix_with_threshold_discounts_config:, # The name of the price. name:, - # Configuration for percent pricing - percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -31885,7 +6346,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :percent + model_type: :matrix_with_threshold_discounts ) end @@ -31893,16 +6354,12 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation - ], + matrix_with_threshold_discounts_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, 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: @@ -31940,7 +6397,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -31948,38 +6405,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ] ) end @@ -31987,133 +6444,244 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. + # Unit price used for usage that does not match any defined matrix cell. sig { returns(String) } - attr_accessor :amount + attr_accessor :default_unit_amount - # The currency of the license allocation. + # First matrix dimension key. sig { returns(String) } - attr_accessor :currency + attr_accessor :first_dimension - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # Per-cell unit prices. + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Optional second matrix dimension key. + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension + + sig do + returns( + T.nilable( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + ) + ) + end + attr_reader :threshold_discount_groups sig do params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + threshold_discount_groups: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).void + end + attr_writer :threshold_discount_groups + + # Configuration for matrix_with_threshold_discounts pricing + sig do + params( + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] ).returns(T.attached_class) end def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + # Unit price used for usage that does not match any defined matrix cell. + default_unit_amount:, + # First matrix dimension key. + first_dimension:, + # Per-cell unit prices. + matrix_values:, + # Optional second matrix dimension key. + second_dimension: nil, + threshold_discount_groups: nil ) end sig do override.returns( { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] } ) 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 + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :first_dimension_value + + sig { returns(String) } + attr_accessor :unit_amount + + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension_value + + sig do + params( + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + first_dimension_value:, + unit_amount:, + second_dimension_value: nil + ) + end + + sig do + override.returns( + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + } ) end + def to_hash + end + end - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup, + Orb::Internal::AnyHash + ) + end - # 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 + # Discount rate applied to spend above the threshold. + sig { returns(String) } + attr_accessor :above_threshold_discount_percentage - sig { override.returns({ percent: Float }) } - def to_hash + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + sig { returns(String) } + attr_accessor :below_threshold_discount_percentage + + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + sig { returns(String) } + attr_accessor :cell_coordinates + + sig { returns(String) } + attr_accessor :threshold_amount + + sig { returns(T.nilable(String)) } + attr_accessor :description + + sig do + params( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Discount rate applied to spend above the threshold. + above_threshold_discount_percentage:, + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + below_threshold_discount_percentage:, + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + cell_coordinates:, + threshold_amount:, + description: nil + ) + end + + sig do + override.returns( + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + } + ) + end + def to_hash + end end end end - class EventOutput < Orb::Internal::Type::BaseModel + class TieredWithProration < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, 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 + ) + end - # Configuration for event_output pricing + # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol ) 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 + 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::EventOutput::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -32122,6 +6690,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for tiered_with_proration pricing + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig + ) + end + attr_reader :tiered_with_proration_config + + sig do + params( + tiered_with_proration_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + ).void + end + attr_writer :tiered_with_proration_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -32223,15 +6807,11 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation::OrHash - ], name: String, + tiered_with_proration_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -32261,16 +6841,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for event_output pricing - event_output_config:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, + # Configuration for 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, @@ -32309,7 +6885,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :event_output + model_type: :tiered_with_proration ) end @@ -32317,16 +6893,12 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation - ], model_type: Symbol, name: String, + tiered_with_proration_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -32364,7 +6936,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -32372,38 +6944,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol ] ) end @@ -32411,200 +6983,130 @@ module Orb end end - class EventOutputConfig < Orb::Internal::Type::BaseModel + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, 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 + # Tiers for rating based on total usage quantities into the specified tier with + # proration + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] + ) + end + attr_accessor :tiers - # Configuration for event_output pricing + # Configuration for tiered_with_proration pricing sig do params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) + tiers: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash + ] ).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 + # Tiers for rating based on total usage quantities into the specified tier with + # proration + tiers: ) end sig do override.returns( { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) + tiers: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] } ) end def to_hash end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, + Orb::Internal::AnyHash + ) + end - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # Inclusive tier starting value + sig { returns(String) } + attr_accessor :tier_lower_bound - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } + # 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 - def to_hash + end + + sig do + override.returns( + { tier_lower_bound: String, unit_amount: String } + ) + end + def to_hash + end end end end - sig do - override.returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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::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 - - class BulkWithFilters < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Internal::AnyHash ) end - # Configuration for bulk_with_filters pricing + # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol ) end - attr_reader :bulk_with_filters_config - - sig do - params( - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void - end - attr_writer :bulk_with_filters_config + attr_accessor :cadence - # The cadence to bill for this price on. + # Configuration for grouped_with_min_max_thresholds pricing sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig ) end - attr_accessor :cadence + attr_reader :grouped_with_min_max_thresholds_config + + sig do + params( + grouped_with_min_max_thresholds_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + ).void + end + attr_writer :grouped_with_min_max_thresholds_config # The id of the item the price will be associated with. sig { returns(String) } @@ -32718,10 +7220,10 @@ module Orb sig do params( - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -32743,254 +7245,101 @@ module Orb fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: 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::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash - ) - end - - # Property filters to apply (all must match) - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - ) - end - attr_accessor :filters - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_filters pricing - sig do - params( - filters: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - filters: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ], - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - } - ) - end - def to_hash - end - - class Filter < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, - Orb::Internal::AnyHash - ) - end - - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match - sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params( - property_key: String, - property_value: String - ).returns(T.attached_class) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # 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 + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_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( - { - unit_amount: String, - tier_lower_bound: T.nilable(String) - } - ) - end - def to_hash - end - end + sig do + override.returns( + { + cadence: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash end # The cadence to bill for this price on. @@ -33001,7 +7350,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -33009,51 +7358,111 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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 TieredWithProration < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Internal::AnyHash ) end @@ -33061,11 +7470,27 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol ) end attr_accessor :cadence + # Configuration for cumulative_grouped_allocation pricing + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + ) + end + attr_reader :cumulative_grouped_allocation_config + + sig do + params( + cumulative_grouped_allocation_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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 @@ -33078,22 +7503,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -33195,11 +7604,11 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, item_id: String, name: String, - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -33229,12 +7638,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for cumulative_grouped_allocation pricing + cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, # 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, @@ -33273,7 +7682,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered_with_proration + model_type: :cumulative_grouped_allocation ) end @@ -33281,12 +7690,12 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, model_type: Symbol, name: String, - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -33324,7 +7733,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -33332,38 +7741,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ] ) end @@ -33371,103 +7780,72 @@ module Orb end end - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, Orb::Internal::AnyHash ) end - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers + # The overall allocation across all groups + sig { returns(String) } + attr_accessor :cumulative_allocation - # Configuration for tiered_with_proration pricing + # 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( - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String ).returns(T.attached_class) end def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: + # The 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( { - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } ) end def to_hash end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params( - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end end end - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -33475,26 +7853,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for daily_credit_allowance pricing sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig ) end - attr_reader :grouped_with_min_max_thresholds_config + attr_reader :daily_credit_allowance_config sig do params( - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + daily_credit_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash ).void end - attr_writer :grouped_with_min_max_thresholds_config + attr_writer :daily_credit_allowance_config # The id of the item the price will be associated with. sig { returns(String) } @@ -33609,9 +7987,9 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -33643,8 +8021,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -33687,7 +8065,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :grouped_with_min_max_thresholds + model_type: :daily_credit_allowance ) end @@ -33695,9 +8073,9 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, model_type: Symbol, name: String, @@ -33738,7 +8116,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -33746,38 +8124,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -33785,72 +8163,144 @@ module Orb end end - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # The event property used to group before applying thresholds + # Credits granted per day. Lose-it-or-use-it; does not roll over. sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :daily_allowance - # The maximum amount to charge each group + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value sig { returns(String) } - attr_accessor :maximum_charge + attr_accessor :default_unit_amount - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions - # The base price charged per group + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. sig { returns(String) } - attr_accessor :per_unit_rate + attr_accessor :event_day_property - # Configuration for grouped_with_min_max_thresholds pricing + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing sig do params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] ).returns(T.attached_class) end def self.new( - # The 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: + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end sig do override.returns( { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] } ) end def to_hash end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Internal::AnyHash ) end @@ -33858,30 +8308,30 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for cumulative_grouped_allocation pricing + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for metered_allowance pricing sig do returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig ) end - attr_reader :cumulative_grouped_allocation_config + attr_reader :metered_allowance_config sig do params( - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + metered_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig::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 + attr_writer :metered_allowance_config # The pricing model type sig { returns(Symbol) } @@ -33992,10 +8442,10 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -34026,10 +8476,10 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, # The name of the price. name:, # The id of the billable metric for the price. Only needed if the price is @@ -34070,7 +8520,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :cumulative_grouped_allocation + model_type: :metered_allowance ) end @@ -34078,10 +8528,10 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -34121,7 +8571,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -34129,38 +8579,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ] ) end @@ -34168,59 +8618,91 @@ module Orb end end - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, Orb::Internal::AnyHash ) end - # The overall allocation across all groups + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. sig { returns(String) } - attr_accessor :cumulative_allocation + attr_accessor :allowance_grouping_value - # The allocation per individual group + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. sig { returns(String) } - attr_accessor :group_allocation + attr_accessor :consumption_grouping_value - # The event property used to group usage before applying allocations + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. sig { returns(String) } attr_accessor :grouping_key - # The amount to charge for each unit outside of the allocation + # Per-unit price applied to gross consumption and to the allowance credit. sig { returns(String) } attr_accessor :unit_amount - # Configuration for cumulative_grouped_allocation pricing + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing sig do params( - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String ).returns(T.attached_class) end def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil ) end sig do override.returns( { - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } ) end diff --git a/rbi/orb/models/beta_create_plan_version_params.rbi b/rbi/orb/models/beta_create_plan_version_params.rbi index afb0ad09..f5e6de9f 100644 --- a/rbi/orb/models/beta_create_plan_version_params.rbi +++ b/rbi/orb/models/beta_create_plan_version_params.rbi @@ -282,43 +282,21 @@ module Orb sig do returns( T.nilable( - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput - ) + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice ) ) end - attr_accessor :license_allocation_price + attr_reader :license_allocation_price + + sig do + params( + license_allocation_price: + T.nilable( + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::OrHash + ) + ).void + end + attr_writer :license_allocation_price # The phase to add this price to. sig { returns(T.nilable(Integer)) } @@ -343,6 +321,7 @@ module Orb Orb::NewPlanPackageWithAllocationPrice, Orb::NewPlanUnitWithPercentPrice, Orb::NewPlanMatrixWithAllocationPrice, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::NewPlanUnitWithProrationPrice, Orb::NewPlanGroupedAllocationPrice, @@ -357,6 +336,8 @@ module Orb Orb::NewPlanScalableMatrixWithTieredPricingPrice, Orb::NewPlanCumulativeGroupedBulkPrice, Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::NewPlanMinimumCompositePrice, Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput @@ -371,39 +352,7 @@ module Orb allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), license_allocation_price: T.nilable( - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::OrHash, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::OrHash - ) + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::OrHash ), plan_phase_order: T.nilable(Integer), price: @@ -423,6 +372,7 @@ module Orb Orb::NewPlanPackageWithAllocationPrice::OrHash, Orb::NewPlanUnitWithPercentPrice::OrHash, Orb::NewPlanMatrixWithAllocationPrice::OrHash, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::OrHash, Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::OrHash, Orb::NewPlanUnitWithProrationPrice::OrHash, Orb::NewPlanGroupedAllocationPrice::OrHash, @@ -437,6 +387,8 @@ module Orb Orb::NewPlanScalableMatrixWithTieredPricingPrice::OrHash, Orb::NewPlanCumulativeGroupedBulkPrice::OrHash, Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::OrHash, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::OrHash, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::OrHash, Orb::NewPlanMinimumCompositePrice::OrHash, Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::OrHash, Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::OrHash @@ -462,39 +414,7 @@ module Orb allocation_price: T.nilable(Orb::NewAllocationPrice), license_allocation_price: T.nilable( - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput - ) + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice ), plan_phase_order: T.nilable(Integer), price: @@ -514,6 +434,7 @@ module Orb Orb::NewPlanPackageWithAllocationPrice, Orb::NewPlanUnitWithPercentPrice, Orb::NewPlanMatrixWithAllocationPrice, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::NewPlanUnitWithProrationPrice, Orb::NewPlanGroupedAllocationPrice, @@ -528,6 +449,8 @@ module Orb Orb::NewPlanScalableMatrixWithTieredPricingPrice, Orb::NewPlanCumulativeGroupedBulkPrice, Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::NewPlanMinimumCompositePrice, Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput @@ -539,466 +462,510 @@ module Orb def to_hash end - # The license allocation price to add to the plan. - module LicenseAllocationPrice - extend Orb::Internal::Type::Union - - Variants = + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice, + Orb::Internal::AnyHash ) end - class Unit < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do + # The cadence to bill for this price on. + sig do + returns( + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation + ] + ) + end + attr_accessor :license_allocations + + # The pricing model type + sig do + returns( + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::OrSymbol + ) + end + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # Configuration for unit pricing + sig { returns(Orb::UnitConfig) } + attr_reader :unit_config + + sig { params(unit_config: Orb::UnitConfig::OrHash).void } + attr_writer :unit_config + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, - Orb::Internal::AnyHash + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol ) - end - attr_accessor :cadence + ) + end + attr_accessor :conversion_rate_config - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + # The license allocation price to add to the plan. + sig do + params( + cadence: + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::OrSymbol, + item_id: String, + license_allocations: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation::OrHash + ], + model_type: + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::OrSymbol, + name: String, + unit_config: Orb::UnitConfig::OrHash, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, # License allocations to associate with this price. Each entry defines a # per-license credit pool granted each cadence. Requires license_type_id or # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - + license_allocations:, # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - + model_type:, # The name of the price. - sig { returns(String) } - attr_accessor :name - + name:, # Configuration for unit pricing - sig { returns(Orb::UnitConfig) } - attr_reader :unit_config - - sig { params(unit_config: Orb::UnitConfig::OrHash).void } - attr_writer :unit_config - + unit_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - + billable_metric_id: nil, # If the Price represents a fixed cost, the price will be billed in-advance if # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - + billed_in_advance: nil, # For custom cadence: specifies the duration of the billing period in days or # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - + billing_cycle_configuration: nil, # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - + conversion_rate: nil, # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - + conversion_rate_config: nil, # An ISO 4217 currency string, or custom pricing unit identifier, in which this # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - + currency: nil, # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - + dimensional_price_configuration: nil, # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - + external_price_id: nil, # If the Price represents a fixed cost, this represents the quantity of units # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - + fixed_price_quantity: nil, # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - + invoice_grouping_key: nil, # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - + invoicing_cycle_configuration: nil, # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - + license_type_id: nil, # User-specified key/value pairs for the resource. Individual keys can be removed # by setting the value to `null`, and the entire metadata mapping can be cleared # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - + metadata: nil, # A transient ID that can be used to reference this price when adding adjustments # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id + reference_id: nil + ) + end - sig do - params( + sig do + override.returns( + { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::OrSymbol, item_id: String, license_allocations: T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation::OrHash + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation ], + model_type: + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::OrSymbol, name: String, - unit_config: Orb::UnitConfig::OrHash, + unit_config: Orb::UnitConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + T.nilable(Orb::NewBillingCycleConfiguration), conversion_rate: T.nilable(Float), conversion_rate_config: T.nilable( T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig ) ), currency: T.nilable(String), dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + T.nilable(Orb::NewDimensionalPriceConfiguration), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + T.nilable(Orb::NewBillingCycleConfiguration), license_type_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit pricing - unit_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit + reference_id: T.nilable(String) + } ) - end + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) sig do override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_config: Orb::UnitConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ] ) end - def to_hash + def self.values end + end - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ] + class LicenseAllocation < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation, + Orb::Internal::AnyHash ) end - def self.values - end - end - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation, - Orb::Internal::AnyHash - ) - end + # The amount of credits granted per active license per cadence. + sig { returns(String) } + attr_accessor :amount - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount + # The currency of the license allocation. + sig { returns(String) } + attr_accessor :currency - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + # When True, overage beyond the allocation is written off. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :write_off_overage + sig do + params( + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) + ).returns(T.attached_class) + end + def self.new( + # The amount of credits granted per active license per cadence. + amount:, + # The currency of the license allocation. + currency:, # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + write_off_overage: nil + ) + end - sig do - params( + sig do + override.returns( + { amount: String, currency: String, write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + } ) - end + end + def to_hash + end + end - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } + # The pricing model type + module ModelType + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType ) end - def to_hash - end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNIT = + T.let( + :unit, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ] + ) + end + def self.values end end + end + + # New plan price request body params. + module Price + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewPlanUnitPrice, + Orb::NewPlanTieredPrice, + Orb::NewPlanBulkPrice, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, + Orb::NewPlanPackagePrice, + Orb::NewPlanMatrixPrice, + Orb::NewPlanThresholdTotalAmountPrice, + Orb::NewPlanTieredPackagePrice, + Orb::NewPlanTieredWithMinimumPrice, + Orb::NewPlanGroupedTieredPrice, + Orb::NewPlanTieredPackageWithMinimumPrice, + Orb::NewPlanPackageWithAllocationPrice, + Orb::NewPlanUnitWithPercentPrice, + Orb::NewPlanMatrixWithAllocationPrice, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts, + 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::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, + Orb::NewPlanMinimumCompositePrice, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput + ) + end - class Tiered < Orb::Internal::Type::BaseModel + class BulkWithFilters < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Internal::AnyHash ) end - # The cadence to bill for this price on. + # Configuration for bulk_with_filters pricing sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig ) end - attr_accessor :cadence + attr_reader :bulk_with_filters_config - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + sig do + params( + bulk_with_filters_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash + ).void + end + attr_writer :bulk_with_filters_config - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. + # The cadence to bill for this price on. sig do returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation - ] + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol ) end - attr_accessor :license_allocations + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id # The pricing model type sig { returns(Symbol) } @@ -1008,13 +975,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for tiered pricing - sig { returns(Orb::TieredConfig) } - attr_reader :tiered_config - - sig { params(tiered_config: Orb::TieredConfig::OrHash).void } - attr_writer :tiered_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -1115,15 +1075,12 @@ module Orb sig do params( + bulk_with_filters_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation::OrHash - ], name: String, - tiered_config: Orb::TieredConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1151,18 +1108,14 @@ module Orb ).returns(T.attached_class) end def self.new( + # Configuration for bulk_with_filters pricing + bulk_with_filters_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, - # Configuration for tiered pricing - tiered_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -1201,23 +1154,20 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered + model_type: :bulk_with_filters ) end sig do override.returns( { + bulk_with_filters_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation - ], model_type: Symbol, name: String, - tiered_config: Orb::TieredConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1247,133 +1197,224 @@ module Orb def to_hash end - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + OrHash = T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::Internal::AnyHash ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol + # Property filters to apply (all must match) + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ] ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol + end + attr_accessor :filters + + # Bulk tiers for rating based on total usage volume + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] ) + end + attr_accessor :tiers + + # Configuration for bulk_with_filters pricing + sig do + params( + filters: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash + ], + tiers: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Property filters to apply (all must match) + filters:, + # Bulk tiers for rating based on total usage volume + tiers: + ) + end sig do override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ] + { + filters: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ], + tiers: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + } ) end - def self.values + def to_hash end - end - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation, - Orb::Internal::AnyHash + class Filter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::Internal::AnyHash + ) + end + + # Event property key to filter on + sig { returns(String) } + attr_accessor :property_key + + # Event property value to match + sig { returns(String) } + attr_accessor :property_value + + # Configuration for a single property filter + sig do + params(property_key: String, property_value: String).returns( + T.attached_class ) end + def self.new( + # Event property key to filter on + property_key:, + # Event property value to match + property_value: + ) + end - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount + sig do + override.returns( + { property_key: String, property_value: String } + ) + end + def to_hash + end + end - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, + Orb::Internal::AnyHash + ) + end - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) + # The lower bound for this tier + sig { returns(T.nilable(String)) } + attr_accessor :tier_lower_bound + + # Configuration for a single bulk pricing tier + sig do + params( + unit_amount: String, + tier_lower_bound: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Amount per unit + unit_amount:, + # The lower bound for this tier + tier_lower_bound: nil + ) + end + + sig do + override.returns( + { unit_amount: String, tier_lower_bound: T.nilable(String) } + ) + end + def to_hash + end end + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) sig do override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ] ) end - def to_hash + def self.values end end end - class Bulk < Orb::Internal::Type::BaseModel + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Internal::AnyHash ) end - # Configuration for bulk pricing - sig { returns(Orb::BulkConfig) } - attr_reader :bulk_config - - sig { params(bulk_config: Orb::BulkConfig::OrHash).void } - attr_writer :bulk_config - # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol ) end attr_accessor :cadence @@ -1382,17 +1423,21 @@ 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. + # Configuration for matrix_with_threshold_discounts pricing sig do returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation - ] + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig ) end - attr_accessor :license_allocations + attr_reader :matrix_with_threshold_discounts_config + + sig do + params( + matrix_with_threshold_discounts_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash + ).void + end + attr_writer :matrix_with_threshold_discounts_config # The pricing model type sig { returns(Symbol) } @@ -1502,14 +1547,11 @@ module Orb sig do params( - bulk_config: Orb::BulkConfig::OrHash, cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation::OrHash - ], + matrix_with_threshold_discounts_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -1538,16 +1580,12 @@ module Orb ).returns(T.attached_class) end def self.new( - # Configuration for bulk pricing - bulk_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, + # Configuration for matrix_with_threshold_discounts pricing + matrix_with_threshold_discounts_config:, # The name of the price. name:, # The id of the billable metric for the price. Only needed if the price is @@ -1588,21 +1626,18 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :bulk + model_type: :matrix_with_threshold_discounts ) end sig do override.returns( { - bulk_config: Orb::BulkConfig, cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation - ], + matrix_with_threshold_discounts_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -1642,7 +1677,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -1650,38 +1685,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ] ) end @@ -1689,87 +1724,236 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. + # Unit price used for usage that does not match any defined matrix cell. sig { returns(String) } - attr_accessor :amount + attr_accessor :default_unit_amount - # The currency of the license allocation. + # First matrix dimension key. sig { returns(String) } - attr_accessor :currency + attr_accessor :first_dimension - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # Per-cell unit prices. + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Optional second matrix dimension key. + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension + + sig do + returns( + T.nilable( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + ) + ) + end + attr_reader :threshold_discount_groups sig do params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + threshold_discount_groups: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).void + end + attr_writer :threshold_discount_groups + + # Configuration for matrix_with_threshold_discounts pricing + sig do + params( + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] ).returns(T.attached_class) end def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + # Unit price used for usage that does not match any defined matrix cell. + default_unit_amount:, + # First matrix dimension key. + first_dimension:, + # Per-cell unit prices. + matrix_values:, + # Optional second matrix dimension key. + second_dimension: nil, + threshold_discount_groups: nil ) end sig do override.returns( { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] } ) end def to_hash end - end - end - class BulkWithFilters < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters, - Orb::Internal::AnyHash + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :first_dimension_value + + sig { returns(String) } + attr_accessor :unit_amount + + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension_value + + sig do + params( + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + first_dimension_value:, + unit_amount:, + second_dimension_value: nil ) + end + + sig do + override.returns( + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + } + ) + end + def to_hash + end end - # Configuration for bulk_with_filters pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig - ) - end - attr_reader :bulk_with_filters_config + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup, + Orb::Internal::AnyHash + ) + end - sig do - params( - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void + # Discount rate applied to spend above the threshold. + sig { returns(String) } + attr_accessor :above_threshold_discount_percentage + + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + sig { returns(String) } + attr_accessor :below_threshold_discount_percentage + + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + sig { returns(String) } + attr_accessor :cell_coordinates + + sig { returns(String) } + attr_accessor :threshold_amount + + sig { returns(T.nilable(String)) } + attr_accessor :description + + sig do + params( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Discount rate applied to spend above the threshold. + above_threshold_discount_percentage:, + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + below_threshold_discount_percentage:, + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + cell_coordinates:, + threshold_amount:, + description: nil + ) + end + + sig do + override.returns( + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + } + ) + end + def to_hash + end + end end - attr_writer :bulk_with_filters_config + 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::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol ) end attr_accessor :cadence @@ -1778,18 +1962,6 @@ module Orb sig { returns(String) } attr_accessor :item_id - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -1798,6 +1970,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for tiered_with_proration pricing + sig do + returns( + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig + ) + end + attr_reader :tiered_with_proration_config + + sig do + params( + tiered_with_proration_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + ).void + end + attr_writer :tiered_with_proration_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -1898,16 +2086,12 @@ module Orb sig do params( - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation::OrHash - ], name: String, + tiered_with_proration_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1935,18 +2119,14 @@ module Orb ).returns(T.attached_class) end def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, + # Configuration for tiered_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, @@ -1985,24 +2165,20 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :bulk_with_filters + model_type: :tiered_with_proration ) end sig do override.returns( { - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ], model_type: Symbol, name: String, + tiered_with_proration_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2032,52 +2208,93 @@ module Orb def to_hash end - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash + 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 + ) - # Property filters to apply (all must match) sig do - returns( + override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ] ) end - attr_accessor :filters + def self.values + end + end - # Bulk tiers for rating based on total usage volume + 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::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier ] ) end attr_accessor :tiers - # Configuration for bulk_with_filters pricing + # Configuration for tiered_with_proration pricing sig do params( - filters: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], tiers: T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash ] ).returns(T.attached_class) end def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume + # Tiers for rating based on total usage quantities into the specified tier with + # proration tiers: ) end @@ -2085,13 +2302,9 @@ module Orb sig do override.returns( { - filters: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ], tiers: T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier ] } ) @@ -2099,200 +2312,53 @@ module Orb def to_hash end - class Filter < Orb::Internal::Type::BaseModel + class Tier < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, Orb::Internal::AnyHash ) end - # Event property key to filter on + # Inclusive tier starting value sig { returns(String) } - attr_accessor :property_key + attr_accessor :tier_lower_bound - # Event property value to match + # Amount per unit sig { returns(String) } - attr_accessor :property_value + attr_accessor :unit_amount - # Configuration for a single property filter + # Configuration for a single tiered with proration tier sig do - params(property_key: String, property_value: String).returns( + params(tier_lower_bound: String, unit_amount: String).returns( T.attached_class ) end def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: + # Inclusive tier starting value + tier_lower_bound:, + # Amount per unit + unit_amount: ) end sig do override.returns( - { property_key: String, property_value: String } + { tier_lower_bound: String, unit_amount: String } ) end def to_hash end end + 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 - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - 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 + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Internal::AnyHash ) end @@ -2300,26 +2366,30 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol ) end attr_accessor :cadence - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. + # Configuration for grouped_with_min_max_thresholds pricing sig do returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation - ] + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig ) end - attr_accessor :license_allocations + 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) } @@ -2329,13 +2399,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for package pricing - sig { returns(Orb::PackageConfig) } - attr_reader :package_config - - sig { params(package_config: Orb::PackageConfig::OrHash).void } - attr_writer :package_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -2437,14 +2500,11 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation::OrHash - ], name: String, - package_config: Orb::PackageConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2474,16 +2534,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for grouped_with_min_max_thresholds pricing + grouped_with_min_max_thresholds_config:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, - # Configuration for package pricing - package_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -2522,7 +2578,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :package + model_type: :grouped_with_min_max_thresholds ) end @@ -2530,15 +2586,12 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation - ], model_type: Symbol, name: String, - package_config: Orb::PackageConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2576,7 +2629,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2584,38 +2637,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ] ) end @@ -2623,50 +2676,59 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. + # The event property used to group before applying thresholds sig { returns(String) } - attr_accessor :amount + attr_accessor :grouping_key - # The currency of the license allocation. + # The maximum amount to charge each group sig { returns(String) } - attr_accessor :currency + attr_accessor :maximum_charge - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # 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( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String ).returns(T.attached_class) end def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + # The 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( { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } ) end @@ -2675,11 +2737,11 @@ module Orb end end - class Matrix < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Internal::AnyHash ) end @@ -2687,33 +2749,30 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol ) end attr_accessor :cadence - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. + # Configuration for cumulative_grouped_allocation pricing sig do returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation - ] + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig ) end - attr_accessor :license_allocations + attr_reader :cumulative_grouped_allocation_config - # Configuration for matrix pricing - sig { returns(Orb::MatrixConfig) } - attr_reader :matrix_config + sig do + params( + cumulative_grouped_allocation_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + ).void + end + attr_writer :cumulative_grouped_allocation_config - sig { params(matrix_config: Orb::MatrixConfig::OrHash).void } - attr_writer :matrix_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) } @@ -2824,13 +2883,10 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation::OrHash - ], - matrix_config: Orb::MatrixConfig::OrHash, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -2861,14 +2917,10 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for cumulative_grouped_allocation pricing + cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # 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 @@ -2909,7 +2961,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :matrix + model_type: :cumulative_grouped_allocation ) end @@ -2917,13 +2969,10 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation - ], - matrix_config: Orb::MatrixConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -2963,7 +3012,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2971,38 +3020,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ] ) end @@ -3010,50 +3059,59 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. + # The overall allocation across all groups sig { returns(String) } - attr_accessor :amount + attr_accessor :cumulative_allocation - # The currency of the license allocation. + # The allocation per individual group sig { returns(String) } - attr_accessor :currency + attr_accessor :group_allocation - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # The event property used to group usage before applying allocations + sig { returns(String) } + attr_accessor :grouping_key + + # The amount to charge for each unit outside of the allocation + sig { returns(String) } + attr_accessor :unit_amount + # Configuration for cumulative_grouped_allocation pricing sig do params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String ).returns(T.attached_class) end def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + # The overall allocation across all groups + cumulative_allocation:, + # The allocation per individual group + group_allocation:, + # The event property used to group usage before applying allocations + grouping_key:, + # The amount to charge for each unit outside of the allocation + unit_amount: ) end sig do override.returns( { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } ) end @@ -3062,11 +3120,11 @@ module Orb end end - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -3074,26 +3132,30 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. + # Configuration for daily_credit_allowance pricing sig do returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ] + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig ) end - attr_accessor :license_allocations + attr_reader :daily_credit_allowance_config + + sig do + params( + daily_credit_allowance_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash + ).void + end + attr_writer :daily_credit_allowance_config + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id # The pricing model type sig { returns(Symbol) } @@ -3103,22 +3165,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for threshold_total_amount pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig - ) - end - attr_reader :threshold_total_amount_config - - sig do - params( - threshold_total_amount_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::OrHash - ).void - end - attr_writer :threshold_total_amount_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -3220,15 +3266,11 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation::OrHash - ], name: String, - threshold_total_amount_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3258,16 +3300,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, - # Configuration for threshold_total_amount pricing - threshold_total_amount_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -3306,7 +3344,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :threshold_total_amount + model_type: :daily_credit_allowance ) end @@ -3314,16 +3352,12 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ], model_type: Symbol, name: String, - threshold_total_amount_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -3361,7 +3395,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3369,38 +3403,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -3408,145 +3442,132 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. + # Credits granted per day. Lose-it-or-use-it; does not roll over. sig { returns(String) } - attr_accessor :amount + attr_accessor :daily_allowance - # The currency of the license allocation. + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end + attr_accessor :default_unit_amount - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - Orb::Internal::AnyHash - ) - end + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + sig { returns(String) } + attr_accessor :event_day_property - # When the quantity consumed passes a provided threshold, the configured total - # will be charged + # Per-dimension credit rates sig do returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue ] ) end - attr_accessor :consumption_table + attr_accessor :matrix_values - # 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 + # Configuration for daily_credit_allowance pricing sig do params( - consumption_table: + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable::OrHash - ], - prorate: T.nilable(T::Boolean) + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] ).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 + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end sig do override.returns( { - consumption_table: + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ], - prorate: T.nilable(T::Boolean) + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] } ) end def to_hash end - class ConsumptionTable < Orb::Internal::Type::BaseModel + class MatrixValue < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, Orb::Internal::AnyHash ) end - sig { returns(String) } - attr_accessor :threshold + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values - # Total amount for this threshold + # Credits charged per unit of usage matching the specified dimension_values sig { returns(String) } - attr_accessor :total_amount + attr_accessor :unit_amount - # Configuration for a single threshold + # Per-dimension credit price for the daily credit allowance model. sig do - params(threshold: String, total_amount: String).returns( - T.attached_class - ) + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) end def self.new( - threshold:, - # Total amount for this threshold - total_amount: + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: ) end sig do - override.returns({ threshold: String, total_amount: String }) + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) end def to_hash end @@ -3554,11 +3575,11 @@ module Orb end end - class TieredPackage < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Internal::AnyHash ) end @@ -3566,7 +3587,7 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol ) end attr_accessor :cadence @@ -3575,17 +3596,21 @@ 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. + # Configuration for metered_allowance pricing sig do returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation - ] + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig ) end - attr_accessor :license_allocations + attr_reader :metered_allowance_config + + sig do + params( + metered_allowance_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash + ).void + end + attr_writer :metered_allowance_config # The pricing model type sig { returns(Symbol) } @@ -3595,22 +3620,6 @@ module Orb 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)) } @@ -3712,15 +3721,11 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation::OrHash - ], + metered_allowance_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::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: @@ -3752,14 +3757,10 @@ module Orb cadence:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, + # Configuration for metered_allowance pricing + metered_allowance_config:, # 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, @@ -3798,7 +3799,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered_package + model_type: :metered_allowance ) end @@ -3806,16 +3807,12 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation - ], + metered_allowance_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, 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: @@ -3853,7 +3850,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3861,38 +3858,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol ] ) end @@ -3900,161 +3897,104 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. sig { returns(String) } - attr_accessor :amount + attr_accessor :allowance_grouping_value - # The currency of the license allocation. + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. sig { returns(String) } - attr_accessor :currency + attr_accessor :consumption_grouping_value - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + sig { returns(String) } + attr_accessor :grouping_key - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end + # Per-unit price applied to gross consumption and to the allowance credit. + sig { returns(String) } + attr_accessor :unit_amount - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name - class TieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - Orb::Internal::AnyHash - ) - end + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name - sig { returns(String) } - attr_accessor :package_size + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name - # 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 + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name - # Configuration for tiered_package pricing + # Configuration for metered_allowance pricing sig do params( - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier::OrHash - ] + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String ).returns(T.attached_class) end def self.new( - 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: + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + grouping_key:, + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil ) end sig do override.returns( { - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } ) end def to_hash end - - class 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 + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Internal::AnyHash ) end @@ -4062,7 +4002,7 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol ) end attr_accessor :cadence @@ -4071,18 +4011,6 @@ module Orb sig { returns(String) } attr_accessor :item_id - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -4091,21 +4019,21 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for tiered_with_minimum pricing + # Configuration for percent pricing sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig ) end - attr_reader :tiered_with_minimum_config + attr_reader :percent_config sig do params( - tiered_with_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::OrHash + percent_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash ).void end - attr_writer :tiered_with_minimum_config + attr_writer :percent_config # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -4208,15 +4136,11 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::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, + 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: @@ -4248,14 +4172,10 @@ module Orb cadence:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, - # Configuration for tiered_with_minimum pricing - tiered_with_minimum_config:, + # 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, @@ -4294,7 +4214,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered_with_minimum + model_type: :percent ) end @@ -4302,16 +4222,12 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::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, + percent_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4349,7 +4265,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -4357,38 +4273,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol ] ) end @@ -4396,183 +4312,38 @@ module Orb 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 + class PercentConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, 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 + # What percent of the component subtotals to charge + sig { returns(Float) } + attr_accessor :percent - # 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 + # Configuration for percent pricing + sig { params(percent: Float).returns(T.attached_class) } 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 + # What percent of the component subtotals to charge + percent: ) 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 + sig { override.returns({ percent: Float }) } 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 + class EventOutput < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, Orb::Internal::AnyHash ) end @@ -4580,43 +4351,31 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for grouped_tiered pricing + # Configuration for event_output pricing sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig ) end - attr_reader :grouped_tiered_config + attr_reader :event_output_config sig do params( - grouped_tiered_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::OrHash + event_output_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash ).void end - attr_writer :grouped_tiered_config + 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::GroupedTiered::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -4726,14 +4485,10 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol, - grouped_tiered_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::OrHash, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation::OrHash - ], name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -4764,14 +4519,10 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for grouped_tiered pricing - grouped_tiered_config:, + # 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 @@ -4812,7 +4563,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :grouped_tiered + model_type: :event_output ) end @@ -4820,14 +4571,10 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol, - grouped_tiered_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation - ], model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -4867,7 +4614,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -4875,38 +4622,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol ] ) end @@ -4914,26255 +4661,974 @@ module Orb end end - class GroupedTieredConfig < Orb::Internal::Type::BaseModel + class EventOutputConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, + Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, Orb::Internal::AnyHash ) end - # The billable metric property used to group before tiering + # The key in the event data to extract the unit rate from. sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :unit_rating_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 + # 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 grouped_tiered pricing + # Configuration for event_output pricing sig do params( - grouping_key: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier::OrHash - ] + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) ).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: + # 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( { - grouping_key: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) } ) end def to_hash end + end + 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 do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::Price::Variants + ] + ) + end + def self.variants + end + end + end - sig { returns(String) } - attr_accessor :tier_lower_bound + class RemoveAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::RemoveAdjustment, + Orb::Internal::AnyHash + ) + end - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount + # The id of the adjustment to remove from on the plan. + sig { returns(String) } + attr_accessor :adjustment_id - # 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 + # The phase to remove this adjustment from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end + sig do + params( + adjustment_id: String, + plan_phase_order: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # The id of the adjustment to remove from on the plan. + adjustment_id:, + # The phase to remove this adjustment from. + plan_phase_order: nil + ) + end - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation, - Orb::Internal::AnyHash - ) - end + sig do + override.returns( + { adjustment_id: String, plan_phase_order: T.nilable(Integer) } + ) + end + def to_hash + end + end - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount + class RemovePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::RemovePrice, + Orb::Internal::AnyHash + ) + end - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + # The id of the price to remove from the plan. + sig { returns(String) } + attr_accessor :price_id - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # The phase to remove this price from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end + sig do + params( + 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( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - 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 - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Internal::AnyHash - ) - end + # The definition of a new adjustment to create and add to the plan. + sig do + returns( + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ) + ) + end + attr_accessor :adjustment - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence + # The id of the adjustment on the plan to replace in the plan. + sig { returns(String) } + attr_accessor :replaces_adjustment_id - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + # The phase to replace this adjustment from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations + sig do + params( + adjustment: + T.any( + Orb::NewPercentageDiscount::OrHash, + Orb::NewUsageDiscount::OrHash, + Orb::NewAmountDiscount::OrHash, + Orb::NewMinimum::OrHash, + Orb::NewMaximum::OrHash + ), + replaces_adjustment_id: String, + plan_phase_order: T.nilable(Integer) + ).returns(T.attached_class) + end + def self.new( + # The definition of a new adjustment to create and add to the plan. + adjustment:, + # The id of the adjustment on the plan to replace in the plan. + replaces_adjustment_id:, + # The phase to replace this adjustment from. + plan_phase_order: nil + ) + end - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type + sig do + override.returns( + { + adjustment: + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ), + replaces_adjustment_id: String, + plan_phase_order: T.nilable(Integer) + } + ) + end + def to_hash + end - # The name of the price. - sig { returns(String) } - attr_accessor :name + # The definition of a new adjustment to create and add to the plan. + module Adjustment + extend Orb::Internal::Type::Union - # Configuration for tiered_package_with_minimum pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig + Variants = + T.type_alias do + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum ) 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 + sig do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Variants + ] + ) + end + def self.variants + end + end + end - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id + class ReplacePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice, + Orb::Internal::AnyHash + ) + end - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance + # The id of the price on the plan to replace in the plan. + sig { returns(String) } + attr_accessor :replaces_price_id - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration + # The allocation price to add to the plan. + sig { returns(T.nilable(Orb::NewAllocationPrice)) } + attr_reader :allocation_price - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration + sig do + params( + allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) + ).void + end + attr_writer :allocation_price - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation::OrHash - ], - name: String, - tiered_package_with_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_package_with_minimum pricing - tiered_package_with_minimum_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_package_with_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_package_with_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(Float) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_package_with_minimum pricing - sig do - params( - package_size: Float, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - tiers: - ) - end - - sig do - override.returns( - { - package_size: Float, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :minimum_amount - - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier - sig do - params( - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - ).returns(T.attached_class) - end - def self.new(minimum_amount:, per_unit:, tier_lower_bound:) - end - - sig do - override.returns( - { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - ) - end - def to_hash - end - end - end - end - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for package_with_allocation pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig - ) - end - attr_reader :package_with_allocation_config - - sig do - params( - package_with_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig::OrHash - ).void - end - attr_writer :package_with_allocation_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation::OrHash - ], - name: String, - package_with_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for package_with_allocation pricing - package_with_allocation_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :package_with_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - package_with_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :allocation - - sig { returns(String) } - attr_accessor :package_amount - - sig { returns(String) } - attr_accessor :package_size - - # Configuration for package_with_allocation pricing - sig do - params( - allocation: String, - package_amount: String, - package_size: String - ).returns(T.attached_class) - end - def self.new(allocation:, package_amount:, package_size:) - end - - sig do - override.returns( - { - allocation: String, - package_amount: String, - package_size: String - } - ) - end - def to_hash - end - end - end - - class UnitWithPercent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit_with_percent pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig - ) - end - attr_reader :unit_with_percent_config - - sig do - params( - unit_with_percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig::OrHash - ).void - end - attr_writer :unit_with_percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation::OrHash - ], - name: String, - unit_with_percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit_with_percent pricing - unit_with_percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit_with_percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_with_percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent, out of 100, of the calculated total to charge - sig { returns(String) } - attr_accessor :percent - - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for unit_with_percent pricing - sig do - params(percent: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # What percent, out of 100, of the calculated total to charge - percent:, - # Rate per unit of usage - unit_amount: - ) - end - - sig { override.returns({ percent: String, unit_amount: String }) } - def to_hash - end - end - end - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix_with_allocation pricing - sig { returns(Orb::MatrixWithAllocationConfig) } - attr_reader :matrix_with_allocation_config - - sig do - params( - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash - ).void - end - attr_writer :matrix_with_allocation_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation::OrHash - ], - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix_with_allocation pricing - matrix_with_allocation_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix_with_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ], - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation::OrHash - ], - name: String, - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class UnitWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit_with_proration pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig - ) - end - attr_reader :unit_with_proration_config - - sig do - params( - unit_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig::OrHash - ).void - end - attr_writer :unit_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation::OrHash - ], - name: String, - unit_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit_with_proration pricing - unit_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for unit_with_proration pricing - sig { params(unit_amount: String).returns(T.attached_class) } - def self.new( - # Rate per unit of usage - unit_amount: - ) - end - - sig { override.returns({ unit_amount: String }) } - def to_hash - end - end - end - - class GroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_allocation pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig - ) - end - attr_reader :grouped_allocation_config - - sig do - params( - grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig::OrHash - ).void - end - attr_writer :grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol, - grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_allocation pricing - grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol, - grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # Usage allocation per group - sig { returns(String) } - attr_accessor :allocation - - # How to determine the groups that should each be allocated some quantity - sig { returns(String) } - attr_accessor :grouping_key - - # Unit rate for post-allocation - sig { returns(String) } - attr_accessor :overage_unit_rate - - # Configuration for grouped_allocation pricing - sig do - params( - allocation: String, - grouping_key: String, - overage_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # Usage allocation per group - allocation:, - # How to determine the groups that should each be allocated some quantity - grouping_key:, - # Unit rate for post-allocation - overage_unit_rate: - ) - end - - sig do - override.returns( - { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class BulkWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk_with_proration pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig - ) - end - attr_reader :bulk_with_proration_config - - sig do - params( - bulk_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::OrHash - ).void - end - attr_writer :bulk_with_proration_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::OrHash, - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk_with_proration pricing - bulk_with_proration_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_proration - ) - end - - sig do - override.returns( - { - bulk_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Cost per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier with proration - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Cost per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { unit_amount: String, tier_lower_bound: T.nilable(String) } - ) - end - def to_hash - end - end - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_prorated_minimum pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig - ) - end - attr_reader :grouped_with_prorated_minimum_config - - sig do - params( - grouped_with_prorated_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_prorated_minimum_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol, - grouped_with_prorated_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_prorated_minimum pricing - grouped_with_prorated_minimum_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_prorated_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol, - grouped_with_prorated_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # How to determine the groups that should each have a minimum - sig { returns(String) } - attr_accessor :grouping_key - - # The minimum amount to charge per group - sig { returns(String) } - attr_accessor :minimum - - # The amount to charge per unit - sig { returns(String) } - attr_accessor :unit_rate - - # Configuration for grouped_with_prorated_minimum pricing - sig do - params( - grouping_key: String, - minimum: String, - unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # How to determine the groups that should each have a minimum - grouping_key:, - # The minimum amount to charge per group - minimum:, - # The amount to charge per unit - unit_rate: - ) - end - - sig do - override.returns( - { grouping_key: String, minimum: String, unit_rate: String } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_metered_minimum pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig - ) - end - attr_reader :grouped_with_metered_minimum_config - - sig do - params( - grouped_with_metered_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_metered_minimum_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol, - grouped_with_metered_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_metered_minimum pricing - grouped_with_metered_minimum_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_metered_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol, - grouped_with_metered_minimum_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - sig { returns(String) } - attr_accessor :grouping_key - - # The minimum amount to charge per group per unit - sig { returns(String) } - attr_accessor :minimum_unit_amount - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :pricing_key - - # Scale the unit rates by the scaling factor. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ] - ) - end - attr_accessor :scaling_factors - - # Used to determine the unit rate scaling factor - sig { returns(String) } - attr_accessor :scaling_key - - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts - - # Configuration for grouped_with_metered_minimum pricing - sig do - params( - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor::OrHash - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - grouping_key:, - # The minimum amount to charge per group per unit - minimum_unit_amount:, - # Used to determine the unit rate - pricing_key:, - # Scale the unit rates by the scaling factor. - scaling_factors:, - # Used to determine the unit rate scaling factor - scaling_key:, - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - unit_amounts: - ) - end - - sig do - override.returns( - { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - } - ) - end - def to_hash - end - - class ScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(String) } - attr_accessor :scaling_value - - # Configuration for a scaling factor - sig do - params(scaling_factor: String, scaling_value: String).returns( - T.attached_class - ) - end - def self.new(scaling_factor:, scaling_value:) - end - - sig do - override.returns( - { scaling_factor: String, scaling_value: String } - ) - end - def to_hash - end - end - - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :pricing_value - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a unit amount - sig do - params(pricing_value: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - pricing_value:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { pricing_value: String, unit_amount: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - ) - end - attr_reader :grouped_with_min_max_thresholds_config - - sig do - params( - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash - ).void - end - attr_writer :grouped_with_min_max_thresholds_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_min_max_thresholds - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before applying thresholds - sig { returns(String) } - attr_accessor :grouping_key - - # The maximum amount to charge each group - sig { returns(String) } - attr_accessor :maximum_charge - - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge - - # The base price charged per group - sig { returns(String) } - attr_accessor :per_unit_rate - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before applying thresholds - grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: - ) - end - - sig do - override.returns( - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix_with_display_name pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig - ) - end - attr_reader :matrix_with_display_name_config - - sig do - params( - matrix_with_display_name_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash - ).void - end - attr_writer :matrix_with_display_name_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation::OrHash - ], - matrix_with_display_name_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix_with_display_name pricing - matrix_with_display_name_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix_with_display_name - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ], - matrix_with_display_name_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - Orb::Internal::AnyHash - ) - end - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :dimension - - # Apply per unit pricing to each dimension value - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts - - # Configuration for matrix_with_display_name pricing - sig do - params( - dimension: String, - unit_amounts: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Used to determine the unit rate - dimension:, - # Apply per unit pricing to each dimension value - unit_amounts: - ) - end - - sig do - override.returns( - { - dimension: String, - unit_amounts: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - } - ) - end - def to_hash - end - - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount, - Orb::Internal::AnyHash - ) - end - - # The dimension value - sig { returns(String) } - attr_accessor :dimension_value - - # Display name for this dimension value - sig { returns(String) } - attr_accessor :display_name - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a unit amount item - sig do - params( - dimension_value: String, - display_name: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The dimension value - dimension_value:, - # Display name for this dimension value - display_name:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { - dimension_value: String, - display_name: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - end - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_tiered_package pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig - ) - end - attr_reader :grouped_tiered_package_config - - sig do - params( - grouped_tiered_package_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash - ).void - end - attr_writer :grouped_tiered_package_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol, - grouped_tiered_package_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_tiered_package pricing - grouped_tiered_package_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol, - grouped_tiered_package_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before tiering - sig { returns(String) } - attr_accessor :grouping_key - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for grouped_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before tiering - grouping_key:, - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Per package - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier - sig do - params(per_unit: String, tier_lower_bound: String).returns( - T.attached_class - ) - end - def self.new( - # Per package - per_unit:, - tier_lower_bound: - ) - end - - sig do - override.returns( - { per_unit: String, tier_lower_bound: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for max_group_tiered_package pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig - ) - end - attr_reader :max_group_tiered_package_config - - sig do - params( - max_group_tiered_package_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash - ).void - end - attr_writer :max_group_tiered_package_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation::OrHash - ], - max_group_tiered_package_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for max_group_tiered_package pricing - max_group_tiered_package_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :max_group_tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ], - max_group_tiered_package_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before tiering the group with the highest value - sig { returns(String) } - attr_accessor :grouping_key - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing to the largest group after grouping with the provided key. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for max_group_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before tiering the group with the highest value - grouping_key:, - package_size:, - # Apply tiered pricing to the largest group after grouping with the provided key. - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig - ) - end - attr_reader :scalable_matrix_with_unit_pricing_config - - sig do - params( - scalable_matrix_with_unit_pricing_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_unit_pricing_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation::OrHash - ], - name: String, - scalable_matrix_with_unit_pricing_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for scalable_matrix_with_unit_pricing pricing - scalable_matrix_with_unit_pricing_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :scalable_matrix_with_unit_pricing - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ], - model_type: Symbol, - name: String, - scalable_matrix_with_unit_pricing_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - Orb::Internal::AnyHash - ) - end - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :first_dimension - - # Apply a scaling factor to each dimension - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors - - # The final unit price to rate against the output of the matrix - sig { returns(String) } - attr_accessor :unit_price - - # The property used to group this price - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :prorate - - # Used to determine the unit rate (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension - - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor::OrHash - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Used to determine the unit rate - first_dimension:, - # Apply a scaling factor to each dimension - matrix_scaling_factors:, - # The final unit price to rate against the output of the matrix - unit_price:, - # The property used to group this price - grouping_key: nil, - # If true, the unit price will be prorated to the billing period - prorate: nil, - # Used to determine the unit rate (optional) - second_dimension: nil - ) - end - - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) - } - ) - end - def to_hash - end - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :first_dimension_value - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value - - # Configuration for a single matrix scaling factor - sig do - params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil - ) - end - - sig do - override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } - ) - end - def to_hash - end - end - end - end - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig - ) - end - attr_reader :scalable_matrix_with_tiered_pricing_config - - sig do - params( - scalable_matrix_with_tiered_pricing_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_tiered_pricing_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation::OrHash - ], - name: String, - scalable_matrix_with_tiered_pricing_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for scalable_matrix_with_tiered_pricing pricing - scalable_matrix_with_tiered_pricing_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :scalable_matrix_with_tiered_pricing - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ], - model_type: Symbol, - name: String, - scalable_matrix_with_tiered_pricing_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - Orb::Internal::AnyHash - ) - end - - # Used for the scalable matrix first dimension - sig { returns(String) } - attr_accessor :first_dimension - - # Apply a scaling factor to each dimension - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors - - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Used for the scalable matrix second dimension (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension - - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor::OrHash - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier::OrHash - ], - second_dimension: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Used for the scalable matrix first dimension - first_dimension:, - # Apply a scaling factor to each dimension - matrix_scaling_factors:, - tiers:, - # Used for the scalable matrix second dimension (optional) - second_dimension: nil - ) - end - - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ], - second_dimension: T.nilable(String) - } - ) - end - def to_hash - end - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :first_dimension_value - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value - - # Configuration for a single matrix scaling factor - sig do - params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil - ) - end - - sig do - override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier entry with business logic - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new(tier_lower_bound:, unit_amount:) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_bulk pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig - ) - end - attr_reader :cumulative_grouped_bulk_config - - sig do - params( - cumulative_grouped_bulk_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_bulk_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol, - cumulative_grouped_bulk_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_bulk pricing - cumulative_grouped_bulk_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_bulk - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol, - cumulative_grouped_bulk_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - Orb::Internal::AnyHash - ) - end - - # Each tier lower bound must have the same group of values. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ] - ) - end - attr_accessor :dimension_values - - sig { returns(String) } - attr_accessor :group - - # Configuration for cumulative_grouped_bulk pricing - sig do - params( - dimension_values: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue::OrHash - ], - group: String - ).returns(T.attached_class) - end - def self.new( - # Each tier lower bound must have the same group of values. - dimension_values:, - group: - ) - end - - sig do - override.returns( - { - dimension_values: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ], - group: String - } - ) - end - def to_hash - end - - class DimensionValue < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue, - Orb::Internal::AnyHash - ) - end - - # Grouping key value - sig { returns(String) } - attr_accessor :grouping_key - - # Tier lower bound - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Unit amount for this combination - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a dimension value entry - sig do - params( - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # Grouping key value - grouping_key:, - # Tier lower bound - tier_lower_bound:, - # Unit amount for this combination - unit_amount: - ) - end - - sig do - override.returns( - { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_allocation pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - ) - end - attr_reader :cumulative_grouped_allocation_config - - sig do - params( - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # The overall allocation across all groups - sig { returns(String) } - attr_accessor :cumulative_allocation - - # The allocation per individual group - sig { returns(String) } - attr_accessor :group_allocation - - # The event property used to group usage before applying allocations - sig { returns(String) } - attr_accessor :grouping_key - - # The amount to charge for each unit outside of the allocation - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for cumulative_grouped_allocation pricing - sig do - params( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations - grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: - ) - end - - sig do - override.returns( - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MinimumComposite < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for minimum_composite pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig - ) - end - attr_reader :minimum_composite_config - - sig do - params( - minimum_composite_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig::OrHash - ).void - end - attr_writer :minimum_composite_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation::OrHash - ], - minimum_composite_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for minimum_composite pricing - minimum_composite_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :minimum_composite - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ], - minimum_composite_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MinimumCompositeConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig, - Orb::Internal::AnyHash - ) - end - - # The minimum amount to apply - sig { returns(String) } - attr_accessor :minimum_amount - - # If true, subtotals from this price are prorated based on the service period - sig { returns(T.nilable(T::Boolean)) } - attr_reader :prorated - - sig { params(prorated: T::Boolean).void } - attr_writer :prorated - - # Configuration for minimum_composite pricing - sig do - params(minimum_amount: String, prorated: T::Boolean).returns( - T.attached_class - ) - end - def self.new( - # The minimum amount to apply - minimum_amount:, - # If true, subtotals from this price are prorated based on the service period - prorated: nil - ) - end - - sig do - override.returns( - { minimum_amount: String, prorated: T::Boolean } - ) - end - def to_hash - end - end - end - - class Percent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for percent pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig - ) - end - attr_reader :percent_config - - sig do - params( - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig::OrHash - ).void - end - attr_writer :percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation::OrHash - ], - name: String, - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for percent pricing - percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation - ], - model_type: Symbol, - name: String, - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class PercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent::PercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent - - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } - def self.new( - # What percent of the component subtotals to charge - percent: - ) - end - - sig { override.returns({ percent: Float }) } - def to_hash - end - end - end - - class EventOutput < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for event_output pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig - ) - end - attr_reader :event_output_config - - sig do - params( - event_output_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for event_output pricing - event_output_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :event_output - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class EventOutputConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, - Orb::Internal::AnyHash - ) - end - - # The key in the event data to extract the unit rate from. - sig { returns(String) } - attr_accessor :unit_rating_key - - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - sig { returns(T.nilable(String)) } - attr_accessor :default_unit_rate - - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key - - # Configuration for event_output pricing - sig do - params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil - ) - end - - sig do - override.returns( - { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Variants - ] - ) - end - def self.variants - end - end - - # New plan price request body params. - module Price - extend Orb::Internal::Type::Union - - Variants = - T.type_alias do - T.any( - Orb::NewPlanUnitPrice, - Orb::NewPlanTieredPrice, - Orb::NewPlanBulkPrice, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, - Orb::NewPlanPackagePrice, - Orb::NewPlanMatrixPrice, - Orb::NewPlanThresholdTotalAmountPrice, - Orb::NewPlanTieredPackagePrice, - Orb::NewPlanTieredWithMinimumPrice, - Orb::NewPlanGroupedTieredPrice, - Orb::NewPlanTieredPackageWithMinimumPrice, - Orb::NewPlanPackageWithAllocationPrice, - Orb::NewPlanUnitWithPercentPrice, - Orb::NewPlanMatrixWithAllocationPrice, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, - Orb::NewPlanUnitWithProrationPrice, - Orb::NewPlanGroupedAllocationPrice, - Orb::NewPlanBulkWithProrationPrice, - Orb::NewPlanGroupedWithProratedMinimumPrice, - Orb::NewPlanGroupedWithMeteredMinimumPrice, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, - Orb::NewPlanMatrixWithDisplayNamePrice, - Orb::NewPlanGroupedTieredPackagePrice, - Orb::NewPlanMaxGroupTieredPackagePrice, - Orb::NewPlanScalableMatrixWithUnitPricingPrice, - Orb::NewPlanScalableMatrixWithTieredPricingPrice, - Orb::NewPlanCumulativeGroupedBulkPrice, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, - Orb::NewPlanMinimumCompositePrice, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput - ) - end - - class BulkWithFilters < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk_with_filters pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig - ) - end - attr_reader :bulk_with_filters_config - - sig do - params( - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void - end - attr_writer :bulk_with_filters_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_filters - ) - end - - sig do - override.returns( - { - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash - ) - end - - # Property filters to apply (all must match) - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - ) - end - attr_accessor :filters - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_filters pricing - sig do - params( - filters: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - filters: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - } - ) - end - def to_hash - end - - class Filter < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, - Orb::Internal::AnyHash - ) - end - - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match - sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params(property_key: String, property_value: String).returns( - T.attached_class - ) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { unit_amount: String, tier_lower_bound: T.nilable(String) } - ) - end - def to_hash - end - end - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, - item_id: String, - name: String, - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, - item_id: String, - model_type: Symbol, - name: String, - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - ) - end - attr_reader :grouped_with_min_max_thresholds_config - - sig do - params( - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash - ).void - end - attr_writer :grouped_with_min_max_thresholds_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_min_max_thresholds - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before applying thresholds - sig { returns(String) } - attr_accessor :grouping_key - - # The maximum amount to charge each group - sig { returns(String) } - attr_accessor :maximum_charge - - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge - - # The base price charged per group - sig { returns(String) } - attr_accessor :per_unit_rate - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before applying thresholds - grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: - ) - end - - sig do - override.returns( - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - ) - end - def to_hash - end - end - end - - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_allocation pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - ) - end - attr_reader :cumulative_grouped_allocation_config - - sig do - params( - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # The overall allocation across all groups - sig { returns(String) } - attr_accessor :cumulative_allocation - - # The allocation per individual group - sig { returns(String) } - attr_accessor :group_allocation - - # The event property used to group usage before applying allocations - sig { returns(String) } - attr_accessor :grouping_key - - # The amount to charge for each unit outside of the allocation - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for cumulative_grouped_allocation pricing - sig do - params( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations - grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: - ) - end - - sig do - override.returns( - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - - class Percent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for percent pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig - ) - end - attr_reader :percent_config - - sig do - params( - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash - ).void - end - attr_writer :percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, - item_id: String, - name: String, - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # Configuration for percent pricing - percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, - item_id: String, - model_type: Symbol, - name: String, - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class PercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent - - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } - def self.new( - # What percent of the component subtotals to charge - percent: - ) - end - - sig { override.returns({ percent: Float }) } - def to_hash - end - end - end - - class EventOutput < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for event_output pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig - ) - end - attr_reader :event_output_config - - sig do - params( - event_output_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, - item_id: String, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for event_output pricing - event_output_config:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :event_output - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class EventOutputConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, - Orb::Internal::AnyHash - ) - end - - # The key in the event data to extract the unit rate from. - sig { returns(String) } - attr_accessor :unit_rating_key - - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - sig { returns(T.nilable(String)) } - attr_accessor :default_unit_rate - - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key - - # Configuration for event_output pricing - sig do - params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The key in the event data to extract the unit rate from. - unit_rating_key:, - # If provided, this amount will be used as the unit rate when an event does not - # have a value for the `unit_rating_key`. If not provided, events missing a unit - # rate will be ignored. - default_unit_rate: nil, - # An optional key in the event data to group by (e.g., event ID). All events will - # also be grouped by their unit rate. - grouping_key: nil - ) - end - - sig do - override.returns( - { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - } - ) - end - def to_hash - end - end - end - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Variants - ] - ) - end - def self.variants - end - end - end - - class RemoveAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::RemoveAdjustment, - Orb::Internal::AnyHash - ) - end - - # The id of the adjustment to remove from on the plan. - sig { returns(String) } - attr_accessor :adjustment_id - - # The phase to remove this adjustment from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order - - sig do - params( - adjustment_id: String, - plan_phase_order: T.nilable(Integer) - ).returns(T.attached_class) - end - def self.new( - # The id of the adjustment to remove from on the plan. - adjustment_id:, - # The phase to remove this adjustment from. - plan_phase_order: nil - ) - end - - sig do - override.returns( - { adjustment_id: String, plan_phase_order: T.nilable(Integer) } - ) - end - def to_hash - end - end - - class RemovePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::RemovePrice, - Orb::Internal::AnyHash - ) - end - - # The id of the price to remove from the plan. - sig { returns(String) } - attr_accessor :price_id - - # The phase to remove this price from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order - - sig do - params( - price_id: String, - plan_phase_order: T.nilable(Integer) - ).returns(T.attached_class) - end - def self.new( - # The id of the price to remove from the plan. - price_id:, - # The phase to remove this price from. - plan_phase_order: nil - ) - end - - sig do - override.returns( - { price_id: String, plan_phase_order: T.nilable(Integer) } - ) - end - def to_hash - end - end - - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplaceAdjustment, - Orb::Internal::AnyHash - ) - end - - # The definition of a new adjustment to create and add to the plan. - sig do - returns( - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) - ) - end - attr_accessor :adjustment - - # The id of the adjustment on the plan to replace in the plan. - sig { returns(String) } - attr_accessor :replaces_adjustment_id - - # The phase to replace this adjustment from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order - - sig do - params( - adjustment: - T.any( - Orb::NewPercentageDiscount::OrHash, - Orb::NewUsageDiscount::OrHash, - Orb::NewAmountDiscount::OrHash, - Orb::NewMinimum::OrHash, - Orb::NewMaximum::OrHash - ), - replaces_adjustment_id: String, - plan_phase_order: T.nilable(Integer) - ).returns(T.attached_class) - end - def self.new( - # The definition of a new adjustment to create and add to the plan. - adjustment:, - # The id of the adjustment on the plan to replace in the plan. - replaces_adjustment_id:, - # The phase to replace this adjustment from. - plan_phase_order: nil - ) - end - - sig do - override.returns( - { - adjustment: - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ), - replaces_adjustment_id: String, - plan_phase_order: T.nilable(Integer) - } - ) - end - def to_hash - end - - # The definition of a new adjustment to create and add to the plan. - module Adjustment - extend Orb::Internal::Type::Union - - Variants = - T.type_alias do - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) - end - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::Variants - ] - ) - end - def self.variants - end - end - end - - class ReplacePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice, - Orb::Internal::AnyHash - ) - end - - # The id of the price on the plan to replace in the plan. - sig { returns(String) } - attr_accessor :replaces_price_id - - # The allocation price to add to the plan. - sig { returns(T.nilable(Orb::NewAllocationPrice)) } - attr_reader :allocation_price - - sig do - params( - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) - ).void - end - attr_writer :allocation_price - - # The license allocation price to add to the plan. - sig do - returns( - T.nilable( - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput - ) - ) - ) - end - attr_accessor :license_allocation_price - - # The phase to replace this price from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order - - # New plan price request body params. - sig do - returns( - T.nilable( - T.any( - Orb::NewPlanUnitPrice, - Orb::NewPlanTieredPrice, - Orb::NewPlanBulkPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewPlanPackagePrice, - Orb::NewPlanMatrixPrice, - Orb::NewPlanThresholdTotalAmountPrice, - Orb::NewPlanTieredPackagePrice, - Orb::NewPlanTieredWithMinimumPrice, - Orb::NewPlanGroupedTieredPrice, - Orb::NewPlanTieredPackageWithMinimumPrice, - Orb::NewPlanPackageWithAllocationPrice, - Orb::NewPlanUnitWithPercentPrice, - Orb::NewPlanMatrixWithAllocationPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, - Orb::NewPlanUnitWithProrationPrice, - Orb::NewPlanGroupedAllocationPrice, - Orb::NewPlanBulkWithProrationPrice, - Orb::NewPlanGroupedWithProratedMinimumPrice, - Orb::NewPlanGroupedWithMeteredMinimumPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewPlanMatrixWithDisplayNamePrice, - Orb::NewPlanGroupedTieredPackagePrice, - Orb::NewPlanMaxGroupTieredPackagePrice, - Orb::NewPlanScalableMatrixWithUnitPricingPrice, - Orb::NewPlanScalableMatrixWithTieredPricingPrice, - Orb::NewPlanCumulativeGroupedBulkPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::NewPlanMinimumCompositePrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput - ) - ) - ) - end - attr_accessor :price - - sig do - params( - replaces_price_id: String, - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), - license_allocation_price: - T.nilable( - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::OrHash - ) - ), - plan_phase_order: T.nilable(Integer), - price: - T.nilable( - T.any( - Orb::NewPlanUnitPrice::OrHash, - Orb::NewPlanTieredPrice::OrHash, - Orb::NewPlanBulkPrice::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::OrHash, - Orb::NewPlanPackagePrice::OrHash, - Orb::NewPlanMatrixPrice::OrHash, - Orb::NewPlanThresholdTotalAmountPrice::OrHash, - Orb::NewPlanTieredPackagePrice::OrHash, - Orb::NewPlanTieredWithMinimumPrice::OrHash, - Orb::NewPlanGroupedTieredPrice::OrHash, - Orb::NewPlanTieredPackageWithMinimumPrice::OrHash, - Orb::NewPlanPackageWithAllocationPrice::OrHash, - Orb::NewPlanUnitWithPercentPrice::OrHash, - Orb::NewPlanMatrixWithAllocationPrice::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::OrHash, - Orb::NewPlanUnitWithProrationPrice::OrHash, - Orb::NewPlanGroupedAllocationPrice::OrHash, - Orb::NewPlanBulkWithProrationPrice::OrHash, - Orb::NewPlanGroupedWithProratedMinimumPrice::OrHash, - Orb::NewPlanGroupedWithMeteredMinimumPrice::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::OrHash, - Orb::NewPlanMatrixWithDisplayNamePrice::OrHash, - Orb::NewPlanGroupedTieredPackagePrice::OrHash, - Orb::NewPlanMaxGroupTieredPackagePrice::OrHash, - Orb::NewPlanScalableMatrixWithUnitPricingPrice::OrHash, - Orb::NewPlanScalableMatrixWithTieredPricingPrice::OrHash, - Orb::NewPlanCumulativeGroupedBulkPrice::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::OrHash, - Orb::NewPlanMinimumCompositePrice::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent::OrHash, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput::OrHash - ) - ) - ).returns(T.attached_class) - end - def self.new( - # The id of the price on the plan to replace in the plan. - replaces_price_id:, - # The allocation price to add to the plan. - allocation_price: nil, - # The license allocation price to add to the plan. - license_allocation_price: nil, - # The phase to replace this price from. - plan_phase_order: nil, - # New plan price request body params. - price: nil - ) - end - - sig do - override.returns( - { - replaces_price_id: String, - allocation_price: T.nilable(Orb::NewAllocationPrice), - license_allocation_price: - T.nilable( - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput - ) - ), - plan_phase_order: T.nilable(Integer), - price: - T.nilable( - T.any( - Orb::NewPlanUnitPrice, - Orb::NewPlanTieredPrice, - Orb::NewPlanBulkPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewPlanPackagePrice, - Orb::NewPlanMatrixPrice, - Orb::NewPlanThresholdTotalAmountPrice, - Orb::NewPlanTieredPackagePrice, - Orb::NewPlanTieredWithMinimumPrice, - Orb::NewPlanGroupedTieredPrice, - Orb::NewPlanTieredPackageWithMinimumPrice, - Orb::NewPlanPackageWithAllocationPrice, - Orb::NewPlanUnitWithPercentPrice, - Orb::NewPlanMatrixWithAllocationPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, - Orb::NewPlanUnitWithProrationPrice, - Orb::NewPlanGroupedAllocationPrice, - Orb::NewPlanBulkWithProrationPrice, - Orb::NewPlanGroupedWithProratedMinimumPrice, - Orb::NewPlanGroupedWithMeteredMinimumPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewPlanMatrixWithDisplayNamePrice, - Orb::NewPlanGroupedTieredPackagePrice, - Orb::NewPlanMaxGroupTieredPackagePrice, - Orb::NewPlanScalableMatrixWithUnitPricingPrice, - Orb::NewPlanScalableMatrixWithTieredPricingPrice, - Orb::NewPlanCumulativeGroupedBulkPrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::NewPlanMinimumCompositePrice, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput - ) - ) - } - ) - end - def to_hash - end - - # The license allocation price to add to the plan. - module LicenseAllocationPrice - extend Orb::Internal::Type::Union - - Variants = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput - ) - end - - class Unit < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit pricing - sig { returns(Orb::UnitConfig) } - attr_reader :unit_config - - sig { params(unit_config: Orb::UnitConfig::OrHash).void } - attr_writer :unit_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation::OrHash - ], - name: String, - unit_config: Orb::UnitConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit pricing - unit_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_config: Orb::UnitConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Unit::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class Tiered < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered pricing - sig { returns(Orb::TieredConfig) } - attr_reader :tiered_config - - sig { params(tiered_config: Orb::TieredConfig::OrHash).void } - attr_writer :tiered_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation::OrHash - ], - name: String, - tiered_config: Orb::TieredConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered pricing - tiered_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_config: Orb::TieredConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Tiered::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class Bulk < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk pricing - sig { returns(Orb::BulkConfig) } - attr_reader :bulk_config - - sig { params(bulk_config: Orb::BulkConfig::OrHash).void } - attr_writer :bulk_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_config: Orb::BulkConfig::OrHash, - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk pricing - bulk_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk - ) - end - - sig do - override.returns( - { - bulk_config: Orb::BulkConfig, - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Bulk::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class BulkWithFilters < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk_with_filters pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig - ) - end - attr_reader :bulk_with_filters_config - - sig do - params( - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void - end - attr_writer :bulk_with_filters_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash, - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_filters - ) - end - - sig do - override.returns( - { - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash - ) - end - - # Property filters to apply (all must match) - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - ) - end - attr_accessor :filters - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_filters pricing - sig do - params( - filters: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - filters: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - } - ) - end - def to_hash - end - - class Filter < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter, - Orb::Internal::AnyHash - ) - end - - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match - sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params(property_key: String, property_value: String).returns( - T.attached_class - ) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { unit_amount: String, tier_lower_bound: T.nilable(String) } - ) - end - def to_hash - end - end - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class Package < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for package pricing - sig { returns(Orb::PackageConfig) } - attr_reader :package_config - - sig { params(package_config: Orb::PackageConfig::OrHash).void } - attr_writer :package_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation::OrHash - ], - name: String, - package_config: Orb::PackageConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for package pricing - package_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :package - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation - ], - model_type: Symbol, - name: String, - package_config: Orb::PackageConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Package::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class Matrix < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix pricing - sig { returns(Orb::MatrixConfig) } - attr_reader :matrix_config - - sig { params(matrix_config: Orb::MatrixConfig::OrHash).void } - attr_writer :matrix_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation::OrHash - ], - matrix_config: Orb::MatrixConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix pricing - matrix_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation - ], - matrix_config: Orb::MatrixConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Matrix::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for threshold_total_amount pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig - ) - end - attr_reader :threshold_total_amount_config - - sig do - params( - threshold_total_amount_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::OrHash - ).void - end - attr_writer :threshold_total_amount_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation::OrHash - ], - name: String, - threshold_total_amount_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for threshold_total_amount pricing - threshold_total_amount_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :threshold_total_amount - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation - ], - model_type: Symbol, - name: String, - threshold_total_amount_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig, - Orb::Internal::AnyHash - ) - end - - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ] - ) - end - attr_accessor :consumption_table - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :prorate - - # Configuration for threshold_total_amount pricing - sig do - params( - consumption_table: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable::OrHash - ], - prorate: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # When the quantity consumed passes a provided threshold, the configured total - # will be charged - consumption_table:, - # If true, the unit price will be prorated to the billing period - prorate: nil - ) - end - - sig do - override.returns( - { - consumption_table: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable - ], - prorate: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - - class ConsumptionTable < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :threshold - - # Total amount for this threshold - sig { returns(String) } - attr_accessor :total_amount - - # Configuration for a single threshold - sig do - params(threshold: String, total_amount: String).returns( - T.attached_class - ) - end - def self.new( - threshold:, - # Total amount for this threshold - total_amount: - ) - end - - sig do - override.returns({ threshold: String, total_amount: String }) - end - def to_hash - end - end - end - end - - class TieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_package pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig - ) - end - attr_reader :tiered_package_config - - sig do - params( - tiered_package_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::OrHash - ).void - end - attr_writer :tiered_package_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation::OrHash - ], - name: String, - tiered_package_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_package pricing - tiered_package_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_package_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_package pricing - sig do - params( - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. The tier bounds are defined based on - # the total quantity rather than the number of packages, so they must be multiples - # of the package size. - tiers: - ) - end - - sig do - override.returns( - { - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Price per package - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier with business logic - sig do - params(per_unit: String, tier_lower_bound: String).returns( - T.attached_class - ) - end - def self.new( - # Price per package - per_unit:, - tier_lower_bound: - ) - end - - sig do - override.returns( - { per_unit: String, tier_lower_bound: String } - ) - end - def to_hash - end - end - end - end - - class TieredWithMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_minimum pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig - ) - end - attr_reader :tiered_with_minimum_config - - sig do - params( - tiered_with_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::OrHash - ).void - end - attr_writer :tiered_with_minimum_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation::OrHash - ], - name: String, - tiered_with_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_with_minimum pricing - tiered_with_minimum_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_with_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ] - ) - end - attr_accessor :tiers - - # If true, tiers with an accrued amount of 0 will not be included in the rating. - sig { returns(T.nilable(T::Boolean)) } - attr_reader :hide_zero_amount_tiers - - sig { params(hide_zero_amount_tiers: T::Boolean).void } - attr_writer :hide_zero_amount_tiers - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_reader :prorate - - sig { params(prorate: T::Boolean).void } - attr_writer :prorate - - # Configuration for tiered_with_minimum pricing - sig do - params( - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier::OrHash - ], - hide_zero_amount_tiers: T::Boolean, - prorate: T::Boolean - ).returns(T.attached_class) - end - def self.new( - # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are - # defined using exclusive lower bounds. - tiers:, - # If true, tiers with an accrued amount of 0 will not be included in the rating. - hide_zero_amount_tiers: nil, - # If true, the unit price will be prorated to the billing period - prorate: nil - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier - ], - hide_zero_amount_tiers: T::Boolean, - prorate: T::Boolean - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :minimum_amount - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params( - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - minimum_amount:, - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - end - - class GroupedTiered < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_tiered pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig - ) - end - attr_reader :grouped_tiered_config - - sig do - params( - grouped_tiered_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::OrHash - ).void - end - attr_writer :grouped_tiered_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol, - grouped_tiered_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_tiered pricing - grouped_tiered_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_tiered - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::OrSymbol, - grouped_tiered_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, - Orb::Internal::AnyHash - ) - end - - # The billable metric property used to group before tiering - sig { returns(String) } - attr_accessor :grouping_key - - # Apply tiered pricing to each segment generated after grouping with the provided - # key - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for grouped_tiered pricing - sig do - params( - grouping_key: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The billable metric property used to group before tiering - grouping_key:, - # Apply tiered pricing to each segment generated after grouping with the provided - # key - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_package_with_minimum pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig - ) - end - attr_reader :tiered_package_with_minimum_config - - sig do - params( - tiered_package_with_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::OrHash - ).void - end - attr_writer :tiered_package_with_minimum_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation::OrHash - ], - name: String, - tiered_package_with_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_package_with_minimum pricing - tiered_package_with_minimum_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_package_with_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_package_with_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(Float) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_package_with_minimum pricing - sig do - params( - package_size: Float, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - tiers: - ) - end - - sig do - override.returns( - { - package_size: Float, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :minimum_amount - - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier - sig do - params( - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - ).returns(T.attached_class) - end - def self.new(minimum_amount:, per_unit:, tier_lower_bound:) - end - - sig do - override.returns( - { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String - } - ) - end - def to_hash - end - end - end - end - - class PackageWithAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for package_with_allocation pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig - ) - end - attr_reader :package_with_allocation_config - - sig do - params( - package_with_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig::OrHash - ).void - end - attr_writer :package_with_allocation_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation::OrHash - ], - name: String, - package_with_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for package_with_allocation pricing - package_with_allocation_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :package_with_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - package_with_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :allocation - - sig { returns(String) } - attr_accessor :package_amount - - sig { returns(String) } - attr_accessor :package_size - - # Configuration for package_with_allocation pricing - sig do - params( - allocation: String, - package_amount: String, - package_size: String - ).returns(T.attached_class) - end - def self.new(allocation:, package_amount:, package_size:) - end - - sig do - override.returns( - { - allocation: String, - package_amount: String, - package_size: String - } - ) - end - def to_hash - end - end - end - - class UnitWithPercent < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit_with_percent pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig - ) - end - attr_reader :unit_with_percent_config - - sig do - params( - unit_with_percent_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig::OrHash - ).void - end - attr_writer :unit_with_percent_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation::OrHash - ], - name: String, - unit_with_percent_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit_with_percent pricing - unit_with_percent_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit_with_percent - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_with_percent_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithPercent::UnitWithPercentConfig, - Orb::Internal::AnyHash - ) - end - - # What percent, out of 100, of the calculated total to charge - sig { returns(String) } - attr_accessor :percent - - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for unit_with_percent pricing - sig do - params(percent: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # What percent, out of 100, of the calculated total to charge - percent:, - # Rate per unit of usage - unit_amount: - ) - end - - sig { override.returns({ percent: String, unit_amount: String }) } - def to_hash - end - end - end - - class MatrixWithAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix_with_allocation pricing - sig { returns(Orb::MatrixWithAllocationConfig) } - attr_reader :matrix_with_allocation_config - - sig do - params( - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash - ).void - end - attr_writer :matrix_with_allocation_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation::OrHash - ], - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix_with_allocation pricing - matrix_with_allocation_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix_with_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation - ], - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class TieredWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation::OrHash - ], - name: String, - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :tiered_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for tiered_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class UnitWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for unit_with_proration pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig - ) - end - attr_reader :unit_with_proration_config - - sig do - params( - unit_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig::OrHash - ).void - end - attr_writer :unit_with_proration_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation::OrHash - ], - name: String, - unit_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit_with_proration pricing - unit_with_proration_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit_with_proration - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::UnitWithProration::UnitWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for unit_with_proration pricing - sig { params(unit_amount: String).returns(T.attached_class) } - def self.new( - # Rate per unit of usage - unit_amount: - ) - end - - sig { override.returns({ unit_amount: String }) } - def to_hash - end - end - end - - class GroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_allocation pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig - ) - end - attr_reader :grouped_allocation_config - - sig do - params( - grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig::OrHash - ).void - end - attr_writer :grouped_allocation_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol, - grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_allocation pricing - grouped_allocation_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_allocation - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::OrSymbol, - grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::GroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end - - # Usage allocation per group - sig { returns(String) } - attr_accessor :allocation - - # How to determine the groups that should each be allocated some quantity - sig { returns(String) } - attr_accessor :grouping_key - - # Unit rate for post-allocation - sig { returns(String) } - attr_accessor :overage_unit_rate - - # Configuration for grouped_allocation pricing - sig do - params( - allocation: String, - grouping_key: String, - overage_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # Usage allocation per group - allocation:, - # How to determine the groups that should each be allocated some quantity - grouping_key:, - # Unit rate for post-allocation - overage_unit_rate: - ) - end - - sig do - override.returns( - { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class BulkWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk_with_proration pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig - ) - end - attr_reader :bulk_with_proration_config - - sig do - params( - bulk_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::OrHash - ).void - end - attr_writer :bulk_with_proration_config - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - bulk_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::OrHash, - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk_with_proration pricing - bulk_with_proration_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_proration - ) - end - - sig do - override.returns( - { - bulk_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::BulkWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Cost per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier with proration - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Cost per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end - - sig do - override.returns( - { unit_amount: String, tier_lower_bound: T.nilable(String) } - ) - end - def to_hash - end - end - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::BulkWithProration::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_prorated_minimum pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig - ) - end - attr_reader :grouped_with_prorated_minimum_config - - sig do - params( - grouped_with_prorated_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_prorated_minimum_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol, - grouped_with_prorated_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_prorated_minimum pricing - grouped_with_prorated_minimum_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_prorated_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::OrSymbol, - grouped_with_prorated_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # How to determine the groups that should each have a minimum - sig { returns(String) } - attr_accessor :grouping_key - - # The minimum amount to charge per group - sig { returns(String) } - attr_accessor :minimum - - # The amount to charge per unit - sig { returns(String) } - attr_accessor :unit_rate - - # Configuration for grouped_with_prorated_minimum pricing - sig do - params( - grouping_key: String, - minimum: String, - unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # How to determine the groups that should each have a minimum - grouping_key:, - # The minimum amount to charge per group - minimum:, - # The amount to charge per unit - unit_rate: - ) - end - - sig do - override.returns( - { grouping_key: String, minimum: String, unit_rate: String } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithProratedMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_metered_minimum pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig - ) - end - attr_reader :grouped_with_metered_minimum_config - - sig do - params( - grouped_with_metered_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_metered_minimum_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol, - grouped_with_metered_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_metered_minimum pricing - grouped_with_metered_minimum_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_metered_minimum - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::OrSymbol, - grouped_with_metered_minimum_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, - Orb::Internal::AnyHash - ) - end - - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - sig { returns(String) } - attr_accessor :grouping_key - - # The minimum amount to charge per group per unit - sig { returns(String) } - attr_accessor :minimum_unit_amount - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :pricing_key - - # Scale the unit rates by the scaling factor. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ] - ) - end - attr_accessor :scaling_factors - - # Used to determine the unit rate scaling factor - sig { returns(String) } - attr_accessor :scaling_key - - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts - - # Configuration for grouped_with_metered_minimum pricing - sig do - params( - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor::OrHash - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Used to partition the usage into groups. The minimum amount is applied to each - # group. - grouping_key:, - # The minimum amount to charge per group per unit - minimum_unit_amount:, - # Used to determine the unit rate - pricing_key:, - # Scale the unit rates by the scaling factor. - scaling_factors:, - # Used to determine the unit rate scaling factor - scaling_key:, - # Apply per unit pricing to each pricing value. The minimum amount is applied any - # unmatched usage. - unit_amounts: - ) - end - - sig do - override.returns( - { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - } - ) - end - def to_hash - end - - class ScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(String) } - attr_accessor :scaling_value - - # Configuration for a scaling factor - sig do - params(scaling_factor: String, scaling_value: String).returns( - T.attached_class - ) - end - def self.new(scaling_factor:, scaling_value:) - end - - sig do - override.returns( - { scaling_factor: String, scaling_value: String } - ) - end - def to_hash - end - end - - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :pricing_value - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a unit amount - sig do - params(pricing_value: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - pricing_value:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { pricing_value: String, unit_amount: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMeteredMinimum::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - ) - end - attr_reader :grouped_with_min_max_thresholds_config - - sig do - params( - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash - ).void - end - attr_writer :grouped_with_min_max_thresholds_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_with_min_max_thresholds - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before applying thresholds - sig { returns(String) } - attr_accessor :grouping_key - - # The maximum amount to charge each group - sig { returns(String) } - attr_accessor :maximum_charge - - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge - - # The base price charged per group - sig { returns(String) } - attr_accessor :per_unit_rate - - # Configuration for grouped_with_min_max_thresholds pricing - sig do - params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before applying thresholds - grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: - ) - end - - sig do - override.returns( - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - ) - end - def to_hash - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for matrix_with_display_name pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig - ) - end - attr_reader :matrix_with_display_name_config - - sig do - params( - matrix_with_display_name_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash - ).void - end - attr_writer :matrix_with_display_name_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation::OrHash - ], - matrix_with_display_name_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for matrix_with_display_name pricing - matrix_with_display_name_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :matrix_with_display_name - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation - ], - matrix_with_display_name_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig, - Orb::Internal::AnyHash - ) - end - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :dimension - - # Apply per unit pricing to each dimension value - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts - - # Configuration for matrix_with_display_name pricing - sig do - params( - dimension: String, - unit_amounts: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Used to determine the unit rate - dimension:, - # Apply per unit pricing to each dimension value - unit_amounts: - ) - end - - sig do - override.returns( - { - dimension: String, - unit_amounts: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - } - ) - end - def to_hash - end - - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount, - Orb::Internal::AnyHash - ) - end - - # The dimension value - sig { returns(String) } - attr_accessor :dimension_value - - # Display name for this dimension value - sig { returns(String) } - attr_accessor :display_name - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a unit amount item - sig do - params( - dimension_value: String, - display_name: String, - unit_amount: String - ).returns(T.attached_class) - end - def self.new( - # The dimension value - dimension_value:, - # Display name for this dimension value - display_name:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { - dimension_value: String, - display_name: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end - end - - class GroupedTieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for grouped_tiered_package pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig - ) - end - attr_reader :grouped_tiered_package_config - - sig do - params( - grouped_tiered_package_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash - ).void - end - attr_writer :grouped_tiered_package_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol, - grouped_tiered_package_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for grouped_tiered_package pricing - grouped_tiered_package_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :grouped_tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::OrSymbol, - grouped_tiered_package_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation - ], - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before tiering - sig { returns(String) } - attr_accessor :grouping_key - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for grouped_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before tiering - grouping_key:, - package_size:, - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::GroupedTieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Per package - sig { returns(String) } - attr_accessor :per_unit - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Configuration for a single tier - sig do - params(per_unit: String, tier_lower_bound: String).returns( - T.attached_class - ) - end - def self.new( - # Per package - per_unit:, - tier_lower_bound: - ) - end - - sig do - override.returns( - { per_unit: String, tier_lower_bound: String } - ) - end - def to_hash - end - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::GroupedTieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end - - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # Configuration for max_group_tiered_package pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig - ) - end - attr_reader :max_group_tiered_package_config - - sig do - params( - max_group_tiered_package_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash - ).void - end - attr_writer :max_group_tiered_package_config - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation::OrHash - ], - max_group_tiered_package_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # Configuration for max_group_tiered_package pricing - max_group_tiered_package_config:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :max_group_tiered_package - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation - ], - max_group_tiered_package_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, - Orb::Internal::AnyHash - ) - end - - # The event property used to group before tiering the group with the highest value - sig { returns(String) } - attr_accessor :grouping_key - - sig { returns(String) } - attr_accessor :package_size - - # Apply tiered pricing to the largest group after grouping with the provided key. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for max_group_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # The event property used to group before tiering the group with the highest value - grouping_key:, - package_size:, - # Apply tiered pricing to the largest group after grouping with the provided key. - tiers: - ) - end - - sig do - override.returns( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - tier_lower_bound:, - # Per unit amount - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig - ) - end - attr_reader :scalable_matrix_with_unit_pricing_config - - sig do - params( - scalable_matrix_with_unit_pricing_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_unit_pricing_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation::OrHash - ], - name: String, - scalable_matrix_with_unit_pricing_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for scalable_matrix_with_unit_pricing pricing - scalable_matrix_with_unit_pricing_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :scalable_matrix_with_unit_pricing - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation - ], - model_type: Symbol, - name: String, - scalable_matrix_with_unit_pricing_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, - Orb::Internal::AnyHash - ) - end - - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :first_dimension - - # Apply a scaling factor to each dimension - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors - - # The final unit price to rate against the output of the matrix - sig { returns(String) } - attr_accessor :unit_price - - # The property used to group this price - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key - - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :prorate - - # Used to determine the unit rate (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension - - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor::OrHash - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Used to determine the unit rate - first_dimension:, - # Apply a scaling factor to each dimension - matrix_scaling_factors:, - # The final unit price to rate against the output of the matrix - unit_price:, - # The property used to group this price - grouping_key: nil, - # If true, the unit price will be prorated to the billing period - prorate: nil, - # Used to determine the unit rate (optional) - second_dimension: nil - ) - end - - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) - } - ) - end - def to_hash - end - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :first_dimension_value - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value - - # Configuration for a single matrix scaling factor - sig do - params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil - ) - end - - sig do - override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } - ) - end - def to_hash - end - end - end - end - - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig - ) - end - attr_reader :scalable_matrix_with_tiered_pricing_config - - sig do - params( - scalable_matrix_with_tiered_pricing_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_tiered_pricing_config - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation::OrHash - ], - name: String, - scalable_matrix_with_tiered_pricing_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for scalable_matrix_with_tiered_pricing pricing - scalable_matrix_with_tiered_pricing_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :scalable_matrix_with_tiered_pricing - ) - end - - sig do - override.returns( - { - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation - ], - model_type: Symbol, - name: String, - scalable_matrix_with_tiered_pricing_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = - T.let( - :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - ONE_TIME = - T.let( - :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - CUSTOM = - T.let( - :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol - ] - ) - end - def self.values - end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage - - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end - - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, - Orb::Internal::AnyHash - ) - end - - # Used for the scalable matrix first dimension - sig { returns(String) } - attr_accessor :first_dimension - - # Apply a scaling factor to each dimension - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors - - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Used for the scalable matrix second dimension (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension - - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor::OrHash - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier::OrHash - ], - second_dimension: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Used for the scalable matrix first dimension - first_dimension:, - # Apply a scaling factor to each dimension - matrix_scaling_factors:, - tiers:, - # Used for the scalable matrix second dimension (optional) - second_dimension: nil - ) - end - - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ], - second_dimension: T.nilable(String) - } - ) - end - def to_hash - end - - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :first_dimension_value - - sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value - - # Configuration for a single matrix scaling factor - sig do - params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil - ) - end - - sig do - override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier, - Orb::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :tier_lower_bound - - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tier entry with business logic - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new(tier_lower_bound:, unit_amount:) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end - end - end - - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::Internal::AnyHash - ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol - ) - end - attr_accessor :cadence - - # Configuration for cumulative_grouped_bulk pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig - ) - end - attr_reader :cumulative_grouped_bulk_config - - sig do - params( - cumulative_grouped_bulk_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_bulk_config - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - - # For custom cadence: specifies the duration of the billing period in days or - # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - - # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - - # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - - # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - - # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id - - sig do - params( - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::OrSymbol, - cumulative_grouped_bulk_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash, - item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation::OrHash - ], - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # Configuration for cumulative_grouped_bulk pricing - cumulative_grouped_bulk_config:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :cumulative_grouped_bulk + # The license allocation price to add to the plan. + sig do + returns( + T.nilable( + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice ) - end + ) + end + attr_reader :license_allocation_price - 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) - } + sig do + params( + license_allocation_price: + T.nilable( + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::OrHash ) - end - def to_hash - end + ).void + end + attr_writer :license_allocation_price - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum + # The phase to replace this price from. + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # 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::MatrixWithThresholdDiscounts, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, + Orb::NewPlanUnitWithProrationPrice, + Orb::NewPlanGroupedAllocationPrice, + Orb::NewPlanBulkWithProrationPrice, + Orb::NewPlanGroupedWithProratedMinimumPrice, + Orb::NewPlanGroupedWithMeteredMinimumPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewPlanMatrixWithDisplayNamePrice, + Orb::NewPlanGroupedTieredPackagePrice, + Orb::NewPlanMaxGroupTieredPackagePrice, + Orb::NewPlanScalableMatrixWithUnitPricingPrice, + Orb::NewPlanScalableMatrixWithTieredPricingPrice, + Orb::NewPlanCumulativeGroupedBulkPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewPlanMinimumCompositePrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput + ) + ) + ) + end + attr_accessor :price - 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 + params( + replaces_price_id: String, + allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), + license_allocation_price: + T.nilable( + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::OrHash + ), + plan_phase_order: T.nilable(Integer), + price: + T.nilable( + T.any( + Orb::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::MatrixWithThresholdDiscounts::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::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::OrHash, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::OrHash, + Orb::NewPlanMinimumCompositePrice::OrHash, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent::OrHash, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput::OrHash ) + ) + ).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( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::Cadence::TaggedSymbol - ] + sig do + override.returns( + { + replaces_price_id: String, + allocation_price: T.nilable(Orb::NewAllocationPrice), + license_allocation_price: + T.nilable( + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice + ), + plan_phase_order: T.nilable(Integer), + price: + T.nilable( + T.any( + Orb::NewPlanUnitPrice, + Orb::NewPlanTieredPrice, + Orb::NewPlanBulkPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewPlanPackagePrice, + Orb::NewPlanMatrixPrice, + Orb::NewPlanThresholdTotalAmountPrice, + Orb::NewPlanTieredPackagePrice, + Orb::NewPlanTieredWithMinimumPrice, + Orb::NewPlanGroupedTieredPrice, + Orb::NewPlanTieredPackageWithMinimumPrice, + Orb::NewPlanPackageWithAllocationPrice, + Orb::NewPlanUnitWithPercentPrice, + Orb::NewPlanMatrixWithAllocationPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, + Orb::NewPlanUnitWithProrationPrice, + Orb::NewPlanGroupedAllocationPrice, + Orb::NewPlanBulkWithProrationPrice, + Orb::NewPlanGroupedWithProratedMinimumPrice, + Orb::NewPlanGroupedWithMeteredMinimumPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewPlanMatrixWithDisplayNamePrice, + Orb::NewPlanGroupedTieredPackagePrice, + Orb::NewPlanMaxGroupTieredPackagePrice, + Orb::NewPlanScalableMatrixWithUnitPricingPrice, + Orb::NewPlanScalableMatrixWithTieredPricingPrice, + Orb::NewPlanCumulativeGroupedBulkPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewPlanMinimumCompositePrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput + ) ) - end - def self.values - end + } + ) + end + def to_hash + end + + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice, + Orb::Internal::AnyHash + ) end - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, - Orb::Internal::AnyHash - ) - end + # The cadence to bill for this price on. + sig do + returns( + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol + ) + end + attr_accessor :cadence - # 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 + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id - sig { returns(String) } - attr_accessor :group + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation + ] + ) + end + attr_accessor :license_allocations - # 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 + # The pricing model type + sig do + returns( + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol + ) + end + attr_accessor :model_type - sig do - override.returns( - { - dimension_values: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ], - group: String - } - ) - end - def to_hash - end + # The name of the price. + sig { returns(String) } + attr_accessor :name - class DimensionValue < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue, - Orb::Internal::AnyHash - ) - end + # Configuration for unit pricing + sig { returns(Orb::UnitConfig) } + attr_reader :unit_config - # Grouping key value - sig { returns(String) } - attr_accessor :grouping_key + sig { params(unit_config: Orb::UnitConfig::OrHash).void } + attr_writer :unit_config - # Tier lower bound - sig { returns(String) } - attr_accessor :tier_lower_bound + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id - # Unit amount for this combination - sig { returns(String) } - attr_accessor :unit_amount + # If the Price represents a fixed cost, the price will be billed 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 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: + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig ) - end + ) + ) + end + attr_accessor :conversion_rate_config - sig do - override.returns( - { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - ) - end - def to_hash - end - end - end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::LicenseAllocation, - Orb::Internal::AnyHash - ) - end + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } - ) - end - def to_hash - end - end - end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::Internal::AnyHash - ) - end + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration - # The cadence to bill for this price on. - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol - ) - end - attr_accessor :cadence + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id - # Configuration for cumulative_grouped_allocation pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - ) - end - attr_reader :cumulative_grouped_allocation_config + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the 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( - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_allocation_config + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + # The license allocation price to add to the plan. + sig do + params( + cadence: + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol, + item_id: String, + license_allocations: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation::OrHash + ], + model_type: + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol, + name: String, + unit_config: Orb::UnitConfig::OrHash, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - + item_id:, # License allocations to associate with this price. Each entry defines a # 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 - + license_allocations:, # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - + model_type:, # The name of the price. - sig { returns(String) } - attr_accessor :name - + name:, + # Configuration for unit pricing + unit_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - + billable_metric_id: nil, # If the Price represents a fixed cost, the price will be billed in-advance if # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - + billed_in_advance: nil, # For custom cadence: specifies the duration of the billing period in days or # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - + billing_cycle_configuration: nil, # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - + conversion_rate: nil, # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - + conversion_rate_config: nil, # An ISO 4217 currency string, or custom pricing unit identifier, in which this # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - + currency: nil, # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - + dimensional_price_configuration: nil, # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - - # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - + license_type_id: nil, # User-specified key/value pairs for the resource. Individual keys can be removed # by setting the value to `null`, and the entire metadata mapping can be cleared # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - + metadata: nil, # A transient ID that can be used to reference this price when adding adjustments # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id + reference_id: nil + ) + end - sig do - params( + sig do + override.returns( + { cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::OrSymbol, item_id: String, license_allocations: T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation::OrHash + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation ], + model_type: + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::OrSymbol, name: String, + unit_config: Orb::UnitConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + T.nilable(Orb::NewBillingCycleConfiguration), conversion_rate: T.nilable(Float), conversion_rate_config: T.nilable( T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig ) ), currency: T.nilable(String), dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + T.nilable(Orb::NewDimensionalPriceConfiguration), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + T.nilable(Orb::NewBillingCycleConfiguration), license_type_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # 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 + reference_id: T.nilable(String) + } ) - end + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ) 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) - } + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence::TaggedSymbol + ] ) end - def to_hash + def self.values end + end - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::BetaCreatePlanVersionParams::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 - ] + class LicenseAllocation < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation, + Orb::Internal::AnyHash ) 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 of credits granted per active license per cadence. + sig { returns(String) } + attr_accessor :amount - # The amount to charge for each unit outside of the allocation - sig { returns(String) } - attr_accessor :unit_amount + # The currency of the license allocation. + sig { returns(String) } + attr_accessor :currency - # 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 + # When True, overage beyond the allocation is written off. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :write_off_overage - sig do - override.returns( - { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - } - ) - end - def to_hash - end + sig do + params( + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) + ).returns(T.attached_class) end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - + def self.new( # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - + amount:, # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency - + currency:, # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + write_off_overage: nil + ) + end - sig do - params( + sig do + override.returns( + { amount: String, currency: String, write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + } ) - end + end + def to_hash + end + end - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } + # The pricing model type + module ModelType + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType ) end - def to_hash - end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNIT = + T.let( + :unit, + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType::TaggedSymbol + ] + ) + end + def self.values end end + end + + # New plan price request body params. + module Price + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewPlanUnitPrice, + Orb::NewPlanTieredPrice, + Orb::NewPlanBulkPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewPlanPackagePrice, + Orb::NewPlanMatrixPrice, + Orb::NewPlanThresholdTotalAmountPrice, + Orb::NewPlanTieredPackagePrice, + Orb::NewPlanTieredWithMinimumPrice, + Orb::NewPlanGroupedTieredPrice, + Orb::NewPlanTieredPackageWithMinimumPrice, + Orb::NewPlanPackageWithAllocationPrice, + Orb::NewPlanUnitWithPercentPrice, + Orb::NewPlanMatrixWithAllocationPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, + Orb::NewPlanUnitWithProrationPrice, + Orb::NewPlanGroupedAllocationPrice, + Orb::NewPlanBulkWithProrationPrice, + Orb::NewPlanGroupedWithProratedMinimumPrice, + Orb::NewPlanGroupedWithMeteredMinimumPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewPlanMatrixWithDisplayNamePrice, + Orb::NewPlanGroupedTieredPackagePrice, + Orb::NewPlanMaxGroupTieredPackagePrice, + Orb::NewPlanScalableMatrixWithUnitPricingPrice, + Orb::NewPlanScalableMatrixWithTieredPricingPrice, + Orb::NewPlanCumulativeGroupedBulkPrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewPlanMinimumCompositePrice, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput + ) + end - class MinimumComposite < Orb::Internal::Type::BaseModel + class BulkWithFilters < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Internal::AnyHash ) end - # The cadence to bill for this price on. + # Configuration for bulk_with_filters pricing sig do returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig ) end - attr_accessor :cadence - - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + attr_reader :bulk_with_filters_config - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation - ] - ) + params( + bulk_with_filters_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash + ).void end - attr_accessor :license_allocations + attr_writer :bulk_with_filters_config - # Configuration for minimum_composite pricing + # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol ) end - attr_reader :minimum_composite_config + attr_accessor :cadence - sig do - params( - minimum_composite_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::MinimumCompositeConfig::OrHash - ).void - end - attr_writer :minimum_composite_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) } @@ -31272,15 +5738,11 @@ module Orb sig do params( + bulk_with_filters_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::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), @@ -31309,16 +5771,12 @@ module Orb ).returns(T.attached_class) end def self.new( + # Configuration for bulk_with_filters pricing + bulk_with_filters_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. 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 @@ -31359,22 +5817,18 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :minimum_composite + model_type: :bulk_with_filters ) end sig do override.returns( { + bulk_with_filters_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::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), @@ -31406,6 +5860,155 @@ module Orb def to_hash end + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::Internal::AnyHash + ) + end + + # Property filters to apply (all must match) + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ] + ) + end + attr_accessor :filters + + # Bulk tiers for rating based on total usage volume + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + ) + end + attr_accessor :tiers + + # Configuration for bulk_with_filters pricing + sig do + params( + filters: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash + ], + tiers: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Property filters to apply (all must match) + filters:, + # Bulk tiers for rating based on total usage volume + tiers: + ) + end + + sig do + override.returns( + { + filters: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ], + tiers: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + } + ) + end + def to_hash + end + + class Filter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::Internal::AnyHash + ) + end + + # Event property key to filter on + sig { returns(String) } + attr_accessor :property_key + + # Event property value to match + sig { returns(String) } + attr_accessor :property_value + + # Configuration for a single property filter + sig do + params(property_key: String, property_value: String).returns( + T.attached_class + ) + end + def self.new( + # Event property key to filter on + property_key:, + # Event property value to match + property_value: + ) + end + + sig do + override.returns( + { property_key: String, property_value: String } + ) + end + def to_hash + end + end + + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, + Orb::Internal::AnyHash + ) + end + + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount + + # The lower bound for this tier + sig { returns(T.nilable(String)) } + attr_accessor :tier_lower_bound + + # 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 @@ -31414,7 +6017,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -31422,145 +6025,51 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::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::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 + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Internal::AnyHash ) end @@ -31568,7 +6077,7 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol ) end attr_accessor :cadence @@ -31577,17 +6086,21 @@ 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. + # Configuration for matrix_with_threshold_discounts pricing sig do returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation - ] + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig ) end - attr_accessor :license_allocations + attr_reader :matrix_with_threshold_discounts_config + + sig do + params( + matrix_with_threshold_discounts_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash + ).void + end + attr_writer :matrix_with_threshold_discounts_config # The pricing model type sig { returns(Symbol) } @@ -31597,22 +6110,6 @@ module Orb 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)) } @@ -31714,15 +6211,11 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation::OrHash - ], + matrix_with_threshold_discounts_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::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: @@ -31754,14 +6247,10 @@ module Orb cadence:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, + # Configuration for matrix_with_threshold_discounts pricing + matrix_with_threshold_discounts_config:, # The name of the price. name:, - # Configuration for percent pricing - percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -31800,7 +6289,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :percent + model_type: :matrix_with_threshold_discounts ) end @@ -31808,16 +6297,12 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation - ], + matrix_with_threshold_discounts_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, 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: @@ -31855,7 +6340,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -31863,38 +6348,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ] ) end @@ -31902,133 +6387,244 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. + # Unit price used for usage that does not match any defined matrix cell. sig { returns(String) } - attr_accessor :amount + attr_accessor :default_unit_amount - # The currency of the license allocation. + # First matrix dimension key. sig { returns(String) } - attr_accessor :currency + attr_accessor :first_dimension - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # Per-cell unit prices. + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Optional second matrix dimension key. + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension + + sig do + returns( + T.nilable( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + ) + ) + end + attr_reader :threshold_discount_groups sig do params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + threshold_discount_groups: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).void + end + attr_writer :threshold_discount_groups + + # Configuration for matrix_with_threshold_discounts pricing + sig do + params( + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] ).returns(T.attached_class) end def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + # Unit price used for usage that does not match any defined matrix cell. + default_unit_amount:, + # First matrix dimension key. + first_dimension:, + # Per-cell unit prices. + matrix_values:, + # Optional second matrix dimension key. + second_dimension: nil, + threshold_discount_groups: nil ) end sig do override.returns( { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] } ) 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 + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :first_dimension_value + + sig { returns(String) } + attr_accessor :unit_amount + + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension_value + + sig do + params( + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + first_dimension_value:, + unit_amount:, + second_dimension_value: nil + ) + end + + sig do + override.returns( + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + } ) end + def to_hash + end + end - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup, + Orb::Internal::AnyHash + ) + end - # 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 + # Discount rate applied to spend above the threshold. + sig { returns(String) } + attr_accessor :above_threshold_discount_percentage - sig { override.returns({ percent: Float }) } - def to_hash + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + sig { returns(String) } + attr_accessor :below_threshold_discount_percentage + + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + sig { returns(String) } + attr_accessor :cell_coordinates + + sig { returns(String) } + attr_accessor :threshold_amount + + sig { returns(T.nilable(String)) } + attr_accessor :description + + sig do + params( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Discount rate applied to spend above the threshold. + above_threshold_discount_percentage:, + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + below_threshold_discount_percentage:, + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + cell_coordinates:, + threshold_amount:, + description: nil + ) + end + + sig do + override.returns( + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + } + ) + end + def to_hash + end end end end - class EventOutput < Orb::Internal::Type::BaseModel + class TieredWithProration < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, 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 + ) + end - # Configuration for event_output pricing + # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol ) 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 + 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::EventOutput::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -32037,6 +6633,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for tiered_with_proration pricing + sig do + returns( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig + ) + end + attr_reader :tiered_with_proration_config + + sig do + params( + tiered_with_proration_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + ).void + end + attr_writer :tiered_with_proration_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -32138,15 +6750,11 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig::OrHash, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation::OrHash - ], name: String, + tiered_with_proration_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -32176,16 +6784,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for event_output pricing - event_output_config:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, + # Configuration for 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, @@ -32224,7 +6828,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :event_output + model_type: :tiered_with_proration ) end @@ -32232,16 +6836,12 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation - ], model_type: Symbol, name: String, + tiered_with_proration_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -32279,7 +6879,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -32287,38 +6887,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol ] ) end @@ -32326,200 +6926,129 @@ module Orb end end - class EventOutputConfig < Orb::Internal::Type::BaseModel + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, 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 + # Tiers for rating based on total usage quantities into the specified tier with + # proration + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] + ) + end + attr_accessor :tiers - # Configuration for event_output pricing + # Configuration for tiered_with_proration pricing sig do params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) + tiers: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash + ] ).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 + # Tiers for rating based on total usage quantities into the specified tier with + # proration + tiers: ) end sig do override.returns( { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) + tiers: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] } ) end def to_hash end - end - - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation, - Orb::Internal::AnyHash - ) - end - - # The amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, + Orb::Internal::AnyHash + ) + end - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # Inclusive tier starting value + sig { returns(String) } + attr_accessor :tier_lower_bound - sig do - params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil - ) - end + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } + # 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 - def to_hash + end + + sig do + override.returns( + { tier_lower_bound: String, unit_amount: String } + ) + end + def to_hash + end end end end - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::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::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 - - class BulkWithFilters < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Internal::AnyHash ) end - # Configuration for bulk_with_filters pricing + # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol ) end - attr_reader :bulk_with_filters_config + attr_accessor :cadence + # Configuration for grouped_with_min_max_thresholds pricing sig do - params( - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void + returns( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + ) end - attr_writer :bulk_with_filters_config + attr_reader :grouped_with_min_max_thresholds_config - # The cadence to bill for this price on. sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol - ) + params( + grouped_with_min_max_thresholds_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + ).void end - attr_accessor :cadence + attr_writer :grouped_with_min_max_thresholds_config # The id of the item the price will be associated with. sig { returns(String) } @@ -32633,10 +7162,10 @@ module Orb sig do params( - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -32654,254 +7183,105 @@ module Orb currency: T.nilable(String), dimensional_price_configuration: T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: 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::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash - ) - end - - # Property filters to apply (all must match) - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - ) - end - attr_accessor :filters - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_filters pricing - sig do - params( - filters: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - filters: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ], - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - } - ) - end - def to_hash - end - - class Filter < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, - Orb::Internal::AnyHash - ) - end - - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match - sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params(property_key: String, property_value: String).returns( - T.attached_class - ) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # 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 + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_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( - { unit_amount: String, tier_lower_bound: T.nilable(String) } - ) - end - def to_hash - end - end + sig do + override.returns( + { + cadence: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash end # The cadence to bill for this price on. @@ -32912,7 +7292,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -32920,51 +7300,111 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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 TieredWithProration < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Internal::AnyHash ) end @@ -32972,11 +7412,27 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol ) end attr_accessor :cadence + # Configuration for cumulative_grouped_allocation pricing + sig do + returns( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + ) + end + attr_reader :cumulative_grouped_allocation_config + + sig do + params( + cumulative_grouped_allocation_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::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 @@ -32989,22 +7445,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -33106,11 +7546,11 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, item_id: String, name: String, - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -33140,12 +7580,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for cumulative_grouped_allocation pricing + cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, # 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, @@ -33184,7 +7624,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered_with_proration + model_type: :cumulative_grouped_allocation ) end @@ -33192,12 +7632,12 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, model_type: Symbol, name: String, - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -33235,7 +7675,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -33243,38 +7683,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ] ) end @@ -33282,102 +7722,72 @@ module Orb end end - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, Orb::Internal::AnyHash ) end - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers + # The overall allocation across all groups + sig { returns(String) } + attr_accessor :cumulative_allocation - # Configuration for tiered_with_proration pricing + # 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( - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String ).returns(T.attached_class) end def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: + # The 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( { - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } ) end def to_hash end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end end end - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -33385,26 +7795,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for daily_credit_allowance pricing sig do returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig ) end - attr_reader :grouped_with_min_max_thresholds_config + attr_reader :daily_credit_allowance_config sig do params( - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + daily_credit_allowance_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash ).void end - attr_writer :grouped_with_min_max_thresholds_config + attr_writer :daily_credit_allowance_config # The id of the item the price will be associated with. sig { returns(String) } @@ -33519,9 +7929,9 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -33553,8 +7963,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -33597,7 +8007,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :grouped_with_min_max_thresholds + model_type: :daily_credit_allowance ) end @@ -33605,9 +8015,9 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, model_type: Symbol, name: String, @@ -33648,7 +8058,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -33656,38 +8066,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -33695,72 +8105,144 @@ module Orb end end - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # The event property used to group before applying thresholds + # Credits granted per day. Lose-it-or-use-it; does not roll over. sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :daily_allowance - # The maximum amount to charge each group + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value sig { returns(String) } - attr_accessor :maximum_charge + attr_accessor :default_unit_amount - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions - # The base price charged per group + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. sig { returns(String) } - attr_accessor :per_unit_rate + attr_accessor :event_day_property - # Configuration for grouped_with_min_max_thresholds pricing + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing sig do params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] ).returns(T.attached_class) end def self.new( - # The 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: + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end sig do override.returns( { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] } ) end def to_hash end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Internal::AnyHash ) end @@ -33768,30 +8250,30 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for cumulative_grouped_allocation pricing + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for metered_allowance pricing sig do returns( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig ) end - attr_reader :cumulative_grouped_allocation_config + attr_reader :metered_allowance_config sig do params( - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + metered_allowance_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig::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 + attr_writer :metered_allowance_config # The pricing model type sig { returns(Symbol) } @@ -33902,10 +8384,10 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -33936,10 +8418,10 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, # The name of the price. name:, # The id of the billable metric for the price. Only needed if the price is @@ -33980,7 +8462,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :cumulative_grouped_allocation + model_type: :metered_allowance ) end @@ -33988,10 +8470,10 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -34031,7 +8513,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -34039,38 +8521,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ] ) end @@ -34078,59 +8560,91 @@ module Orb end end - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, Orb::Internal::AnyHash ) end - # The overall allocation across all groups + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. sig { returns(String) } - attr_accessor :cumulative_allocation + attr_accessor :allowance_grouping_value - # The allocation per individual group + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. sig { returns(String) } - attr_accessor :group_allocation + attr_accessor :consumption_grouping_value - # The event property used to group usage before applying allocations + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. sig { returns(String) } attr_accessor :grouping_key - # The amount to charge for each unit outside of the allocation + # Per-unit price applied to gross consumption and to the allowance credit. sig { returns(String) } attr_accessor :unit_amount - # Configuration for cumulative_grouped_allocation pricing + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing sig do params( - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String ).returns(T.attached_class) end def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil ) end sig do override.returns( { - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } ) end diff --git a/rbi/orb/models/changed_subscription_resources.rbi b/rbi/orb/models/changed_subscription_resources.rbi index b32e9640..806c7eaf 100644 --- a/rbi/orb/models/changed_subscription_resources.rbi +++ b/rbi/orb/models/changed_subscription_resources.rbi @@ -189,11 +189,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -205,6 +207,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -235,6 +238,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -256,6 +260,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -602,11 +607,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -618,6 +625,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -648,6 +656,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -669,6 +678,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -1398,6 +1408,7 @@ module Orb Orb::Price::PackageWithAllocation::OrHash, Orb::Price::UnitWithPercent::OrHash, Orb::Price::MatrixWithAllocation::OrHash, + Orb::Price::MatrixWithThresholdDiscounts::OrHash, Orb::Price::TieredWithProration::OrHash, Orb::Price::UnitWithProration::OrHash, Orb::Price::GroupedAllocation::OrHash, @@ -1412,6 +1423,8 @@ module Orb Orb::Price::ScalableMatrixWithTieredPricing::OrHash, Orb::Price::CumulativeGroupedBulk::OrHash, Orb::Price::CumulativeGroupedAllocation::OrHash, + Orb::Price::DailyCreditAllowance::OrHash, + Orb::Price::MeteredAllowance::OrHash, Orb::Price::MinimumComposite::OrHash, Orb::Price::Percent::OrHash, Orb::Price::EventOutput::OrHash diff --git a/rbi/orb/models/customer.rbi b/rbi/orb/models/customer.rbi index 29e4b150..65428e2a 100644 --- a/rbi/orb/models/customer.rbi +++ b/rbi/orb/models/customer.rbi @@ -149,11 +149,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -165,6 +167,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -195,6 +198,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -216,6 +220,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -437,11 +442,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -453,6 +460,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -483,6 +491,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -504,6 +513,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -761,11 +771,6 @@ module Orb :netsuite, Orb::Customer::AccountingSyncConfiguration::AccountingProvider::ProviderType::TaggedSymbol ) - NETSUITE_AMPERSAND = - T.let( - :netsuite_ampersand, - Orb::Customer::AccountingSyncConfiguration::AccountingProvider::ProviderType::TaggedSymbol - ) sig do override.returns( diff --git a/rbi/orb/models/customer_create_params.rbi b/rbi/orb/models/customer_create_params.rbi index fb38cc10..1062025d 100644 --- a/rbi/orb/models/customer_create_params.rbi +++ b/rbi/orb/models/customer_create_params.rbi @@ -206,11 +206,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -222,6 +224,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -252,6 +255,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -273,6 +277,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -451,11 +456,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -467,6 +474,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -497,6 +505,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -518,6 +527,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/rbi/orb/models/customer_tax_id.rbi b/rbi/orb/models/customer_tax_id.rbi index c8f3fb2c..949b5683 100644 --- a/rbi/orb/models/customer_tax_id.rbi +++ b/rbi/orb/models/customer_tax_id.rbi @@ -72,11 +72,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -88,6 +90,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -118,6 +121,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -139,6 +143,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -220,9 +225,9 @@ module Orb CO = T.let(:CO, Orb::CustomerTaxID::Country::TaggedSymbol) CR = T.let(:CR, Orb::CustomerTaxID::Country::TaggedSymbol) CV = T.let(:CV, Orb::CustomerTaxID::Country::TaggedSymbol) - DE = T.let(:DE, Orb::CustomerTaxID::Country::TaggedSymbol) CY = T.let(:CY, Orb::CustomerTaxID::Country::TaggedSymbol) CZ = T.let(:CZ, Orb::CustomerTaxID::Country::TaggedSymbol) + DE = T.let(:DE, Orb::CustomerTaxID::Country::TaggedSymbol) DK = T.let(:DK, Orb::CustomerTaxID::Country::TaggedSymbol) DO = T.let(:DO, Orb::CustomerTaxID::Country::TaggedSymbol) EC = T.let(:EC, Orb::CustomerTaxID::Country::TaggedSymbol) @@ -232,9 +237,11 @@ module Orb ET = T.let(:ET, Orb::CustomerTaxID::Country::TaggedSymbol) EU = T.let(:EU, Orb::CustomerTaxID::Country::TaggedSymbol) FI = T.let(:FI, Orb::CustomerTaxID::Country::TaggedSymbol) + FO = T.let(:FO, Orb::CustomerTaxID::Country::TaggedSymbol) FR = T.let(:FR, Orb::CustomerTaxID::Country::TaggedSymbol) GB = T.let(:GB, Orb::CustomerTaxID::Country::TaggedSymbol) GE = T.let(:GE, Orb::CustomerTaxID::Country::TaggedSymbol) + GI = T.let(:GI, Orb::CustomerTaxID::Country::TaggedSymbol) GN = T.let(:GN, Orb::CustomerTaxID::Country::TaggedSymbol) GR = T.let(:GR, Orb::CustomerTaxID::Country::TaggedSymbol) HK = T.let(:HK, Orb::CustomerTaxID::Country::TaggedSymbol) @@ -254,6 +261,7 @@ module Orb KZ = T.let(:KZ, Orb::CustomerTaxID::Country::TaggedSymbol) LA = T.let(:LA, Orb::CustomerTaxID::Country::TaggedSymbol) LI = T.let(:LI, Orb::CustomerTaxID::Country::TaggedSymbol) + LK = T.let(:LK, Orb::CustomerTaxID::Country::TaggedSymbol) LT = T.let(:LT, Orb::CustomerTaxID::Country::TaggedSymbol) LU = T.let(:LU, Orb::CustomerTaxID::Country::TaggedSymbol) LV = T.let(:LV, Orb::CustomerTaxID::Country::TaggedSymbol) @@ -275,6 +283,7 @@ module Orb PH = T.let(:PH, Orb::CustomerTaxID::Country::TaggedSymbol) PL = T.let(:PL, Orb::CustomerTaxID::Country::TaggedSymbol) PT = T.let(:PT, Orb::CustomerTaxID::Country::TaggedSymbol) + PY = T.let(:PY, Orb::CustomerTaxID::Country::TaggedSymbol) RO = T.let(:RO, Orb::CustomerTaxID::Country::TaggedSymbol) RS = T.let(:RS, Orb::CustomerTaxID::Country::TaggedSymbol) RU = T.let(:RU, Orb::CustomerTaxID::Country::TaggedSymbol) @@ -360,8 +369,10 @@ module Orb ES_CIF = T.let(:es_cif, Orb::CustomerTaxID::Type::TaggedSymbol) ET_TIN = T.let(:et_tin, Orb::CustomerTaxID::Type::TaggedSymbol) EU_OSS_VAT = T.let(:eu_oss_vat, Orb::CustomerTaxID::Type::TaggedSymbol) + FO_VAT = T.let(:fo_vat, Orb::CustomerTaxID::Type::TaggedSymbol) GB_VAT = T.let(:gb_vat, Orb::CustomerTaxID::Type::TaggedSymbol) GE_VAT = T.let(:ge_vat, Orb::CustomerTaxID::Type::TaggedSymbol) + GI_TIN = T.let(:gi_tin, Orb::CustomerTaxID::Type::TaggedSymbol) GN_NIF = T.let(:gn_nif, Orb::CustomerTaxID::Type::TaggedSymbol) HK_BR = T.let(:hk_br, Orb::CustomerTaxID::Type::TaggedSymbol) HR_OIB = T.let(:hr_oib, Orb::CustomerTaxID::Type::TaggedSymbol) @@ -370,6 +381,7 @@ module Orb IL_VAT = T.let(:il_vat, Orb::CustomerTaxID::Type::TaggedSymbol) IN_GST = T.let(:in_gst, Orb::CustomerTaxID::Type::TaggedSymbol) IS_VAT = T.let(:is_vat, Orb::CustomerTaxID::Type::TaggedSymbol) + IT_CF = T.let(:it_cf, Orb::CustomerTaxID::Type::TaggedSymbol) JP_CN = T.let(:jp_cn, Orb::CustomerTaxID::Type::TaggedSymbol) JP_RN = T.let(:jp_rn, Orb::CustomerTaxID::Type::TaggedSymbol) JP_TRN = T.let(:jp_trn, Orb::CustomerTaxID::Type::TaggedSymbol) @@ -381,6 +393,7 @@ module Orb LA_TIN = T.let(:la_tin, Orb::CustomerTaxID::Type::TaggedSymbol) LI_UID = T.let(:li_uid, Orb::CustomerTaxID::Type::TaggedSymbol) LI_VAT = T.let(:li_vat, Orb::CustomerTaxID::Type::TaggedSymbol) + LK_VAT = T.let(:lk_vat, Orb::CustomerTaxID::Type::TaggedSymbol) MA_VAT = T.let(:ma_vat, Orb::CustomerTaxID::Type::TaggedSymbol) MD_VAT = T.let(:md_vat, Orb::CustomerTaxID::Type::TaggedSymbol) ME_PIB = T.let(:me_pib, Orb::CustomerTaxID::Type::TaggedSymbol) @@ -399,6 +412,7 @@ module Orb PE_RUC = T.let(:pe_ruc, Orb::CustomerTaxID::Type::TaggedSymbol) PH_TIN = T.let(:ph_tin, Orb::CustomerTaxID::Type::TaggedSymbol) PL_NIP = T.let(:pl_nip, Orb::CustomerTaxID::Type::TaggedSymbol) + PY_RUC = T.let(:py_ruc, Orb::CustomerTaxID::Type::TaggedSymbol) RO_TIN = T.let(:ro_tin, Orb::CustomerTaxID::Type::TaggedSymbol) RS_PIB = T.let(:rs_pib, Orb::CustomerTaxID::Type::TaggedSymbol) RU_INN = T.let(:ru_inn, Orb::CustomerTaxID::Type::TaggedSymbol) diff --git a/rbi/orb/models/customer_update_by_external_id_params.rbi b/rbi/orb/models/customer_update_by_external_id_params.rbi index 94aeb2f6..2fc58df7 100644 --- a/rbi/orb/models/customer_update_by_external_id_params.rbi +++ b/rbi/orb/models/customer_update_by_external_id_params.rbi @@ -223,11 +223,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -239,6 +241,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -269,6 +272,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -290,6 +294,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -473,11 +478,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -489,6 +496,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -519,6 +527,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -540,6 +549,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/rbi/orb/models/customer_update_params.rbi b/rbi/orb/models/customer_update_params.rbi index 1fff7dfc..b63b8c77 100644 --- a/rbi/orb/models/customer_update_params.rbi +++ b/rbi/orb/models/customer_update_params.rbi @@ -215,11 +215,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -231,6 +233,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -261,6 +264,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -282,6 +286,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -461,11 +466,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -477,6 +484,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -507,6 +515,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -528,6 +537,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/rbi/orb/models/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 4f3830ad..6bad9729 100644 --- a/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +++ b/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi @@ -653,9 +653,9 @@ module Orb sig { returns(Symbol) } attr_accessor :entry_type - # A future date (specified in YYYY-MM-DD format) used for expiration change, - # denoting when credits transferred (as part of a partial block expiration) should - # expire. + # A date (specified in YYYY-MM-DD format) used for expiration change, denoting + # when credits transferred (as part of a partial block expiration) should expire. + # This date must be on or after the effective date of the credit block. sig { returns(Date) } attr_accessor :target_expiry_date @@ -703,9 +703,9 @@ module Orb ).returns(T.attached_class) end def self.new( - # A future date (specified in YYYY-MM-DD format) used for expiration change, - # denoting when credits transferred (as part of a partial block expiration) should - # expire. + # A date (specified in YYYY-MM-DD format) used for expiration change, denoting + # when credits transferred (as part of a partial block expiration) should expire. + # This date must be on or after the effective date of the credit block. target_expiry_date:, # The number of credits to effect. Note that this is required for increment, # decrement, void, or undo operations. diff --git a/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi b/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi index 993b6694..bb75be1e 100644 --- a/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +++ b/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi @@ -653,9 +653,9 @@ module Orb sig { returns(Symbol) } attr_accessor :entry_type - # A future date (specified in YYYY-MM-DD format) used for expiration change, - # denoting when credits transferred (as part of a partial block expiration) should - # expire. + # A date (specified in YYYY-MM-DD format) used for expiration change, denoting + # when credits transferred (as part of a partial block expiration) should expire. + # This date must be on or after the effective date of the credit block. sig { returns(Date) } attr_accessor :target_expiry_date @@ -703,9 +703,9 @@ module Orb ).returns(T.attached_class) end def self.new( - # A future date (specified in YYYY-MM-DD format) used for expiration change, - # denoting when credits transferred (as part of a partial block expiration) should - # expire. + # A date (specified in YYYY-MM-DD format) used for expiration change, denoting + # when credits transferred (as part of a partial block expiration) should expire. + # This date must be on or after the effective date of the credit block. target_expiry_date:, # The number of credits to effect. Note that this is required for increment, # decrement, void, or undo operations. diff --git a/rbi/orb/models/dimensional_price_group.rbi b/rbi/orb/models/dimensional_price_group.rbi index 82a3d93b..8a1d8bd1 100644 --- a/rbi/orb/models/dimensional_price_group.rbi +++ b/rbi/orb/models/dimensional_price_group.rbi @@ -37,7 +37,7 @@ module Orb attr_accessor :name # A dimensional price group is used to partition the result of a billable metric - # by a set of dimensions. Prices in a price group must specify the parition used + # by a set of dimensions. Prices in a price group must specify the partition used # to derive their usage. sig do params( diff --git a/rbi/orb/models/invoice.rbi b/rbi/orb/models/invoice.rbi index 882e64a5..eeab2478 100644 --- a/rbi/orb/models/invoice.rbi +++ b/rbi/orb/models/invoice.rbi @@ -103,11 +103,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -119,6 +121,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -149,6 +152,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -170,6 +174,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -480,11 +485,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -496,6 +503,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -526,6 +534,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -547,6 +556,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -1203,6 +1213,7 @@ module Orb Orb::Price::PackageWithAllocation::OrHash, Orb::Price::UnitWithPercent::OrHash, Orb::Price::MatrixWithAllocation::OrHash, + Orb::Price::MatrixWithThresholdDiscounts::OrHash, Orb::Price::TieredWithProration::OrHash, Orb::Price::UnitWithProration::OrHash, Orb::Price::GroupedAllocation::OrHash, @@ -1217,6 +1228,8 @@ module Orb Orb::Price::ScalableMatrixWithTieredPricing::OrHash, Orb::Price::CumulativeGroupedBulk::OrHash, Orb::Price::CumulativeGroupedAllocation::OrHash, + Orb::Price::DailyCreditAllowance::OrHash, + Orb::Price::MeteredAllowance::OrHash, Orb::Price::MinimumComposite::OrHash, Orb::Price::Percent::OrHash, Orb::Price::EventOutput::OrHash diff --git a/rbi/orb/models/invoice_fetch_upcoming_response.rbi b/rbi/orb/models/invoice_fetch_upcoming_response.rbi index 6b306e10..183eba70 100644 --- a/rbi/orb/models/invoice_fetch_upcoming_response.rbi +++ b/rbi/orb/models/invoice_fetch_upcoming_response.rbi @@ -122,11 +122,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -138,6 +140,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -168,6 +171,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -189,6 +193,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -519,11 +524,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -535,6 +542,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -565,6 +573,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -586,6 +595,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -1306,6 +1316,7 @@ module Orb Orb::Price::PackageWithAllocation::OrHash, Orb::Price::UnitWithPercent::OrHash, Orb::Price::MatrixWithAllocation::OrHash, + Orb::Price::MatrixWithThresholdDiscounts::OrHash, Orb::Price::TieredWithProration::OrHash, Orb::Price::UnitWithProration::OrHash, Orb::Price::GroupedAllocation::OrHash, @@ -1320,6 +1331,8 @@ module Orb Orb::Price::ScalableMatrixWithTieredPricing::OrHash, Orb::Price::CumulativeGroupedBulk::OrHash, Orb::Price::CumulativeGroupedAllocation::OrHash, + Orb::Price::DailyCreditAllowance::OrHash, + Orb::Price::MeteredAllowance::OrHash, Orb::Price::MinimumComposite::OrHash, Orb::Price::Percent::OrHash, Orb::Price::EventOutput::OrHash diff --git a/rbi/orb/models/invoice_issue_summary_response.rbi b/rbi/orb/models/invoice_issue_summary_response.rbi index 69275c67..fe2f0972 100644 --- a/rbi/orb/models/invoice_issue_summary_response.rbi +++ b/rbi/orb/models/invoice_issue_summary_response.rbi @@ -122,11 +122,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -138,6 +140,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -168,6 +171,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -189,6 +193,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -465,11 +470,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -481,6 +488,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -511,6 +519,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -532,6 +541,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/rbi/orb/models/invoice_line_item_create_response.rbi b/rbi/orb/models/invoice_line_item_create_response.rbi index a3098fb4..d0a7a8a5 100644 --- a/rbi/orb/models/invoice_line_item_create_response.rbi +++ b/rbi/orb/models/invoice_line_item_create_response.rbi @@ -145,6 +145,7 @@ module Orb Orb::Price::PackageWithAllocation::OrHash, Orb::Price::UnitWithPercent::OrHash, Orb::Price::MatrixWithAllocation::OrHash, + Orb::Price::MatrixWithThresholdDiscounts::OrHash, Orb::Price::TieredWithProration::OrHash, Orb::Price::UnitWithProration::OrHash, Orb::Price::GroupedAllocation::OrHash, @@ -159,6 +160,8 @@ module Orb Orb::Price::ScalableMatrixWithTieredPricing::OrHash, Orb::Price::CumulativeGroupedBulk::OrHash, Orb::Price::CumulativeGroupedAllocation::OrHash, + Orb::Price::DailyCreditAllowance::OrHash, + Orb::Price::MeteredAllowance::OrHash, Orb::Price::MinimumComposite::OrHash, Orb::Price::Percent::OrHash, Orb::Price::EventOutput::OrHash diff --git a/rbi/orb/models/invoice_list_summary_response.rbi b/rbi/orb/models/invoice_list_summary_response.rbi index 8cbe2d7a..337a5c9a 100644 --- a/rbi/orb/models/invoice_list_summary_response.rbi +++ b/rbi/orb/models/invoice_list_summary_response.rbi @@ -119,11 +119,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -135,6 +137,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -165,6 +168,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -186,6 +190,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -462,11 +467,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -478,6 +485,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -508,6 +516,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -529,6 +538,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/rbi/orb/models/new_allocation_price.rbi b/rbi/orb/models/new_allocation_price.rbi index 37225495..f314acf3 100644 --- a/rbi/orb/models/new_allocation_price.rbi +++ b/rbi/orb/models/new_allocation_price.rbi @@ -47,6 +47,12 @@ module Orb sig { returns(T.nilable(String)) } attr_accessor :license_type_id + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + # The (per-unit) cost basis of each created block. If non-zero, a customer will be # invoiced according to the quantity and per unit cost basis specified for the # allocation each cadence. @@ -66,6 +72,7 @@ module Orb filters: T.nilable(T::Array[Orb::NewAllocationPrice::Filter::OrHash]), item_id: T.nilable(String), license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), per_unit_cost_basis: String ).returns(T.attached_class) end @@ -90,6 +97,10 @@ module Orb item_id: nil, # The license type ID to associate the price with license allocation. license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, # The (per-unit) cost basis of each created block. If non-zero, a customer will be # invoiced according to the quantity and per unit cost basis specified for the # allocation each cadence. @@ -108,6 +119,7 @@ module Orb filters: T.nilable(T::Array[Orb::NewAllocationPrice::Filter]), item_id: T.nilable(String), license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), per_unit_cost_basis: String } ) diff --git a/rbi/orb/models/per_price_cost.rbi b/rbi/orb/models/per_price_cost.rbi index 2cf5ad6b..d340c6ad 100644 --- a/rbi/orb/models/per_price_cost.rbi +++ b/rbi/orb/models/per_price_cost.rbi @@ -43,6 +43,7 @@ module Orb Orb::Price::PackageWithAllocation::OrHash, Orb::Price::UnitWithPercent::OrHash, Orb::Price::MatrixWithAllocation::OrHash, + Orb::Price::MatrixWithThresholdDiscounts::OrHash, Orb::Price::TieredWithProration::OrHash, Orb::Price::UnitWithProration::OrHash, Orb::Price::GroupedAllocation::OrHash, @@ -57,6 +58,8 @@ module Orb Orb::Price::ScalableMatrixWithTieredPricing::OrHash, Orb::Price::CumulativeGroupedBulk::OrHash, Orb::Price::CumulativeGroupedAllocation::OrHash, + Orb::Price::DailyCreditAllowance::OrHash, + Orb::Price::MeteredAllowance::OrHash, Orb::Price::MinimumComposite::OrHash, Orb::Price::Percent::OrHash, Orb::Price::EventOutput::OrHash diff --git a/rbi/orb/models/plan.rbi b/rbi/orb/models/plan.rbi index e7f8296a..660e0204 100644 --- a/rbi/orb/models/plan.rbi +++ b/rbi/orb/models/plan.rbi @@ -177,6 +177,7 @@ module Orb Orb::Price::PackageWithAllocation::OrHash, Orb::Price::UnitWithPercent::OrHash, Orb::Price::MatrixWithAllocation::OrHash, + Orb::Price::MatrixWithThresholdDiscounts::OrHash, Orb::Price::TieredWithProration::OrHash, Orb::Price::UnitWithProration::OrHash, Orb::Price::GroupedAllocation::OrHash, @@ -191,6 +192,8 @@ module Orb Orb::Price::ScalableMatrixWithTieredPricing::OrHash, Orb::Price::CumulativeGroupedBulk::OrHash, Orb::Price::CumulativeGroupedAllocation::OrHash, + Orb::Price::DailyCreditAllowance::OrHash, + Orb::Price::MeteredAllowance::OrHash, Orb::Price::MinimumComposite::OrHash, Orb::Price::Percent::OrHash, Orb::Price::EventOutput::OrHash diff --git a/rbi/orb/models/plan_create_params.rbi b/rbi/orb/models/plan_create_params.rbi index 52adeeed..440aca17 100644 --- a/rbi/orb/models/plan_create_params.rbi +++ b/rbi/orb/models/plan_create_params.rbi @@ -31,6 +31,10 @@ module Orb sig { returns(T.nilable(String)) } attr_accessor :default_invoice_memo + # An optional user-defined description of the plan. + sig { returns(T.nilable(String)) } + attr_accessor :description + sig { returns(T.nilable(String)) } attr_accessor :external_plan_id @@ -67,6 +71,7 @@ module Orb adjustments: T.nilable(T::Array[Orb::PlanCreateParams::Adjustment::OrHash]), default_invoice_memo: T.nilable(String), + description: T.nilable(String), external_plan_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), net_terms: T.nilable(Integer), @@ -89,6 +94,8 @@ module Orb adjustments: nil, # Free-form text which is available on the invoice PDF and the Orb invoice portal. default_invoice_memo: nil, + # An optional user-defined description of the plan. + description: nil, external_plan_id: nil, # User-specified key/value pairs for the resource. Individual keys can be removed # by setting the value to `null`, and the entire metadata mapping can be cleared @@ -116,6 +123,7 @@ module Orb prices: T::Array[Orb::PlanCreateParams::Price], adjustments: T.nilable(T::Array[Orb::PlanCreateParams::Adjustment]), default_invoice_memo: T.nilable(String), + description: T.nilable(String), external_plan_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), net_terms: T.nilable(Integer), @@ -148,44 +156,20 @@ module Orb # The license allocation price to add to the plan. sig do returns( - T.nilable( - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput - ) - ) + T.nilable(Orb::PlanCreateParams::Price::LicenseAllocationPrice) ) end - attr_accessor :license_allocation_price + attr_reader :license_allocation_price + + sig do + params( + license_allocation_price: + T.nilable( + Orb::PlanCreateParams::Price::LicenseAllocationPrice::OrHash + ) + ).void + end + attr_writer :license_allocation_price # The phase to add this price to. sig { returns(T.nilable(Integer)) } @@ -210,6 +194,7 @@ module Orb Orb::NewPlanPackageWithAllocationPrice, Orb::NewPlanUnitWithPercentPrice, Orb::NewPlanMatrixWithAllocationPrice, + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts, Orb::PlanCreateParams::Price::Price::TieredWithProration, Orb::NewPlanUnitWithProrationPrice, Orb::NewPlanGroupedAllocationPrice, @@ -224,6 +209,8 @@ module Orb Orb::NewPlanScalableMatrixWithTieredPricingPrice, Orb::NewPlanCumulativeGroupedBulkPrice, Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance, + Orb::PlanCreateParams::Price::Price::MeteredAllowance, Orb::NewPlanMinimumCompositePrice, Orb::PlanCreateParams::Price::Price::Percent, Orb::PlanCreateParams::Price::Price::EventOutput @@ -238,39 +225,7 @@ module Orb allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), license_allocation_price: T.nilable( - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent::OrHash, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput::OrHash - ) + Orb::PlanCreateParams::Price::LicenseAllocationPrice::OrHash ), plan_phase_order: T.nilable(Integer), price: @@ -290,6 +245,7 @@ module Orb Orb::NewPlanPackageWithAllocationPrice::OrHash, Orb::NewPlanUnitWithPercentPrice::OrHash, Orb::NewPlanMatrixWithAllocationPrice::OrHash, + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::OrHash, Orb::PlanCreateParams::Price::Price::TieredWithProration::OrHash, Orb::NewPlanUnitWithProrationPrice::OrHash, Orb::NewPlanGroupedAllocationPrice::OrHash, @@ -304,6 +260,8 @@ module Orb Orb::NewPlanScalableMatrixWithTieredPricingPrice::OrHash, Orb::NewPlanCumulativeGroupedBulkPrice::OrHash, Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::OrHash, + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::OrHash, + Orb::PlanCreateParams::Price::Price::MeteredAllowance::OrHash, Orb::NewPlanMinimumCompositePrice::OrHash, Orb::PlanCreateParams::Price::Price::Percent::OrHash, Orb::PlanCreateParams::Price::Price::EventOutput::OrHash @@ -328,41 +286,7 @@ module Orb { allocation_price: T.nilable(Orb::NewAllocationPrice), license_allocation_price: - T.nilable( - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput - ) - ), + T.nilable(Orb::PlanCreateParams::Price::LicenseAllocationPrice), plan_phase_order: T.nilable(Integer), price: T.nilable( @@ -381,6 +305,7 @@ module Orb Orb::NewPlanPackageWithAllocationPrice, Orb::NewPlanUnitWithPercentPrice, Orb::NewPlanMatrixWithAllocationPrice, + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts, Orb::PlanCreateParams::Price::Price::TieredWithProration, Orb::NewPlanUnitWithProrationPrice, Orb::NewPlanGroupedAllocationPrice, @@ -395,6 +320,8 @@ module Orb Orb::NewPlanScalableMatrixWithTieredPricingPrice, Orb::NewPlanCumulativeGroupedBulkPrice, Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance, + Orb::PlanCreateParams::Price::Price::MeteredAllowance, Orb::NewPlanMinimumCompositePrice, Orb::PlanCreateParams::Price::Price::Percent, Orb::PlanCreateParams::Price::Price::EventOutput @@ -406,466 +333,510 @@ module Orb def to_hash end - # The license allocation price to add to the plan. - module LicenseAllocationPrice - extend Orb::Internal::Type::Union - - Variants = + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + OrHash = T.type_alias do T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput + Orb::PlanCreateParams::Price::LicenseAllocationPrice, + Orb::Internal::AnyHash ) end - class Unit < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do + # The cadence to bill for this price on. + sig do + returns( + Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # License allocations to associate with this price. Each entry defines a + # per-license credit pool granted each cadence. Requires license_type_id or + # license_type_configuration to be set. + sig do + returns( + T::Array[ + Orb::PlanCreateParams::Price::LicenseAllocationPrice::LicenseAllocation + ] + ) + end + attr_accessor :license_allocations + + # The pricing model type + sig do + returns( + Orb::PlanCreateParams::Price::LicenseAllocationPrice::ModelType::OrSymbol + ) + end + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # Configuration for unit pricing + sig { returns(Orb::UnitConfig) } + attr_reader :unit_config + + sig { params(unit_config: Orb::UnitConfig::OrHash).void } + attr_writer :unit_config + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit, - Orb::Internal::AnyHash + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig ) - end - - # The cadence to bill for this price on. - sig do - returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::Cadence::OrSymbol ) - end - attr_accessor :cadence + ) + end + attr_accessor :conversion_rate_config - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + # The license allocation price to add to the plan. + sig do + params( + cadence: + Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::OrSymbol, + item_id: String, + license_allocations: + T::Array[ + Orb::PlanCreateParams::Price::LicenseAllocationPrice::LicenseAllocation::OrHash + ], + model_type: + Orb::PlanCreateParams::Price::LicenseAllocationPrice::ModelType::OrSymbol, + name: String, + unit_config: Orb::UnitConfig::OrHash, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, # License allocations to associate with this price. Each entry defines a # per-license credit pool granted each cadence. Requires license_type_id or # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - + license_allocations:, # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - + model_type:, # The name of the price. - sig { returns(String) } - attr_accessor :name - + name:, # Configuration for unit pricing - sig { returns(Orb::UnitConfig) } - attr_reader :unit_config - - sig { params(unit_config: Orb::UnitConfig::OrHash).void } - attr_writer :unit_config - + unit_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. - sig { returns(T.nilable(String)) } - attr_accessor :billable_metric_id - + billable_metric_id: nil, # If the Price represents a fixed cost, the price will be billed in-advance if # this is true, and in-arrears if this is false. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :billed_in_advance - + billed_in_advance: nil, # For custom cadence: specifies the duration of the billing period in days or # months. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :billing_cycle_configuration - - sig do - params( - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :billing_cycle_configuration - + billing_cycle_configuration: nil, # The per unit conversion rate of the price currency to the invoicing currency. - sig { returns(T.nilable(Float)) } - attr_accessor :conversion_rate - + conversion_rate: nil, # The configuration for the rate of the price currency to the invoicing currency. - sig do - returns( - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ) - ) - end - attr_accessor :conversion_rate_config - + conversion_rate_config: nil, # An ISO 4217 currency string, or custom pricing unit identifier, in which this # price is billed. - sig { returns(T.nilable(String)) } - attr_accessor :currency - + currency: nil, # For dimensional price: specifies a price group and dimension values - sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } - attr_reader :dimensional_price_configuration - - sig do - params( - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) - ).void - end - attr_writer :dimensional_price_configuration - + dimensional_price_configuration: nil, # An alias for the price. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id - + external_price_id: nil, # If the Price represents a fixed cost, this represents the quantity of units # applied. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity - + fixed_price_quantity: nil, # The property used to group this price on an invoice - sig { returns(T.nilable(String)) } - attr_accessor :invoice_grouping_key - + invoice_grouping_key: nil, # Within each billing cycle, specifies the cadence at which invoices are produced. # If unspecified, a single invoice is produced per billing cycle. - sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } - attr_reader :invoicing_cycle_configuration - - sig do - params( - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash) - ).void - end - attr_writer :invoicing_cycle_configuration - + invoicing_cycle_configuration: nil, # The ID of the license type to associate with this price. - sig { returns(T.nilable(String)) } - attr_accessor :license_type_id - + license_type_id: nil, # User-specified key/value pairs for the resource. Individual keys can be removed # by setting the value to `null`, and the entire metadata mapping can be cleared # by setting `metadata` to `null`. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } - attr_accessor :metadata - + metadata: nil, # A transient ID that can be used to reference this price when adding adjustments # in the same API call. - sig { returns(T.nilable(String)) } - attr_accessor :reference_id + reference_id: nil + ) + end - sig do - params( + sig do + override.returns( + { cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::Cadence::OrSymbol, + Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::OrSymbol, item_id: String, license_allocations: T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::LicenseAllocation::OrHash + Orb::PlanCreateParams::Price::LicenseAllocationPrice::LicenseAllocation ], + model_type: + Orb::PlanCreateParams::Price::LicenseAllocationPrice::ModelType::OrSymbol, name: String, - unit_config: Orb::UnitConfig::OrHash, + unit_config: Orb::UnitConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + T.nilable(Orb::NewBillingCycleConfiguration), conversion_rate: T.nilable(Float), conversion_rate_config: T.nilable( T.any( - Orb::UnitConversionRateConfig::OrHash, - Orb::TieredConversionRateConfig::OrHash + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig ) ), currency: T.nilable(String), dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + T.nilable(Orb::NewDimensionalPriceConfiguration), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + T.nilable(Orb::NewBillingCycleConfiguration), license_type_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, - # The name of the price. - name:, - # Configuration for unit pricing - unit_config:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :unit + reference_id: T.nilable(String) + } ) - end + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::TaggedSymbol + ) sig do override.returns( - { - cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::Cadence::OrSymbol, - item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::LicenseAllocation - ], - model_type: Symbol, - name: String, - unit_config: Orb::UnitConfig, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } + T::Array[ + Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::TaggedSymbol + ] ) end - def to_hash + def self.values end + end - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::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 - ] + class LicenseAllocation < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PlanCreateParams::Price::LicenseAllocationPrice::LicenseAllocation, + Orb::Internal::AnyHash ) end - def self.values - end - end - class LicenseAllocation < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::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 amount of credits granted per active license per cadence. - sig { returns(String) } - attr_accessor :amount + # The currency of the license allocation. + sig { returns(String) } + attr_accessor :currency - # The currency of the license allocation. - sig { returns(String) } - attr_accessor :currency + # When True, overage beyond the allocation is written off. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :write_off_overage + sig do + params( + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) + ).returns(T.attached_class) + end + def self.new( + # The amount of credits granted per active license per cadence. + amount:, + # The currency of the license allocation. + currency:, # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + write_off_overage: nil + ) + end - sig do - params( + sig do + override.returns( + { amount: String, currency: String, write_off_overage: T.nilable(T::Boolean) - ).returns(T.attached_class) - end - def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + } ) - end + end + def to_hash + end + end - sig do - override.returns( - { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) - } + # The pricing model type + module ModelType + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PlanCreateParams::Price::LicenseAllocationPrice::ModelType ) end - def to_hash - end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNIT = + T.let( + :unit, + Orb::PlanCreateParams::Price::LicenseAllocationPrice::ModelType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::PlanCreateParams::Price::LicenseAllocationPrice::ModelType::TaggedSymbol + ] + ) + end + def self.values end end + end + + # New plan price request body params. + module Price + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewPlanUnitPrice, + Orb::NewPlanTieredPrice, + Orb::NewPlanBulkPrice, + Orb::PlanCreateParams::Price::Price::BulkWithFilters, + Orb::NewPlanPackagePrice, + Orb::NewPlanMatrixPrice, + Orb::NewPlanThresholdTotalAmountPrice, + Orb::NewPlanTieredPackagePrice, + Orb::NewPlanTieredWithMinimumPrice, + Orb::NewPlanGroupedTieredPrice, + Orb::NewPlanTieredPackageWithMinimumPrice, + Orb::NewPlanPackageWithAllocationPrice, + Orb::NewPlanUnitWithPercentPrice, + Orb::NewPlanMatrixWithAllocationPrice, + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts, + Orb::PlanCreateParams::Price::Price::TieredWithProration, + Orb::NewPlanUnitWithProrationPrice, + Orb::NewPlanGroupedAllocationPrice, + Orb::NewPlanBulkWithProrationPrice, + Orb::NewPlanGroupedWithProratedMinimumPrice, + Orb::NewPlanGroupedWithMeteredMinimumPrice, + Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, + Orb::NewPlanMatrixWithDisplayNamePrice, + Orb::NewPlanGroupedTieredPackagePrice, + Orb::NewPlanMaxGroupTieredPackagePrice, + Orb::NewPlanScalableMatrixWithUnitPricingPrice, + Orb::NewPlanScalableMatrixWithTieredPricingPrice, + Orb::NewPlanCumulativeGroupedBulkPrice, + Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance, + Orb::PlanCreateParams::Price::Price::MeteredAllowance, + Orb::NewPlanMinimumCompositePrice, + Orb::PlanCreateParams::Price::Price::Percent, + Orb::PlanCreateParams::Price::Price::EventOutput + ) + end - class Tiered < Orb::Internal::Type::BaseModel + class BulkWithFilters < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered, + Orb::PlanCreateParams::Price::Price::BulkWithFilters, Orb::Internal::AnyHash ) end - # The cadence to bill for this price on. + # Configuration for bulk_with_filters pricing sig do returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::Cadence::OrSymbol + Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig ) end - attr_accessor :cadence + attr_reader :bulk_with_filters_config - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + sig do + params( + bulk_with_filters_config: + Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash + ).void + end + attr_writer :bulk_with_filters_config - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. + # The cadence to bill for this price on. sig do returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::LicenseAllocation - ] + Orb::PlanCreateParams::Price::Price::BulkWithFilters::Cadence::OrSymbol ) end - attr_accessor :license_allocations + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id # The pricing model type sig { returns(Symbol) } @@ -875,13 +846,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for tiered pricing - sig { returns(Orb::TieredConfig) } - attr_reader :tiered_config - - sig { params(tiered_config: Orb::TieredConfig::OrHash).void } - attr_writer :tiered_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -982,15 +946,12 @@ module Orb sig do params( + bulk_with_filters_config: + Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::Cadence::OrSymbol, + Orb::PlanCreateParams::Price::Price::BulkWithFilters::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: @@ -1018,18 +979,14 @@ module Orb ).returns(T.attached_class) end def self.new( + # Configuration for bulk_with_filters pricing + bulk_with_filters_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, - # Configuration for tiered pricing - tiered_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -1068,23 +1025,20 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered + model_type: :bulk_with_filters ) end sig do override.returns( { + bulk_with_filters_config: + Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig, cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::Cadence::OrSymbol, + Orb::PlanCreateParams::Price::Price::BulkWithFilters::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: @@ -1114,133 +1068,224 @@ module Orb def to_hash end - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + OrHash = T.type_alias do - T.all( - Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::Cadence + T.any( + Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::Internal::AnyHash ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - ANNUAL = - T.let( - :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol + # Property filters to apply (all must match) + sig do + returns( + T::Array[ + Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ] ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol + end + attr_accessor :filters + + # Bulk tiers for rating based on total usage volume + sig do + returns( + T::Array[ + Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + ) + end + attr_accessor :tiers + + # Configuration for bulk_with_filters pricing + sig do + params( + filters: + T::Array[ + Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash + ], + tiers: + T::Array[ + Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ], + tiers: + T::Array[ + Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + } + ) + end + def to_hash + end + + class Filter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::BulkWithFilters::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PlanCreateParams::Price::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PlanCreateParams::Price::Price::BulkWithFilters::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::BulkWithFilters::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::BulkWithFilters::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::BulkWithFilters::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::BulkWithFilters::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::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::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 + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk, + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts, 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 + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol ) end attr_accessor :cadence @@ -1249,17 +1294,21 @@ 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. + # Configuration for matrix_with_threshold_discounts pricing sig do returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::LicenseAllocation - ] + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig ) end - attr_accessor :license_allocations + attr_reader :matrix_with_threshold_discounts_config + + sig do + params( + matrix_with_threshold_discounts_config: + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash + ).void + end + attr_writer :matrix_with_threshold_discounts_config # The pricing model type sig { returns(Symbol) } @@ -1369,14 +1418,11 @@ module Orb sig do params( - bulk_config: Orb::BulkConfig::OrHash, cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::LicenseAllocation::OrHash - ], + matrix_with_threshold_discounts_config: + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -1405,16 +1451,12 @@ module Orb ).returns(T.attached_class) end def self.new( - # Configuration for bulk pricing - bulk_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, + # Configuration for matrix_with_threshold_discounts pricing + matrix_with_threshold_discounts_config:, # The name of the price. name:, # The id of the billable metric for the price. Only needed if the price is @@ -1455,21 +1497,18 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :bulk + model_type: :matrix_with_threshold_discounts ) end sig do override.returns( { - bulk_config: Orb::BulkConfig, cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::LicenseAllocation - ], + matrix_with_threshold_discounts_config: + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -1509,7 +1548,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -1517,38 +1556,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ] ) end @@ -1556,87 +1595,236 @@ module Orb end end - class LicenseAllocation < Orb::Internal::Type::BaseModel + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::LicenseAllocation, + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, Orb::Internal::AnyHash ) end - # The amount of credits granted per active license per cadence. + # Unit price used for usage that does not match any defined matrix cell. sig { returns(String) } - attr_accessor :amount + attr_accessor :default_unit_amount - # The currency of the license allocation. + # First matrix dimension key. sig { returns(String) } - attr_accessor :currency + attr_accessor :first_dimension - # When True, overage beyond the allocation is written off. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :write_off_overage + # Per-cell unit prices. + sig do + returns( + T::Array[ + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Optional second matrix dimension key. + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension + + sig do + returns( + T.nilable( + T::Array[ + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + ) + ) + end + attr_reader :threshold_discount_groups sig do params( - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + threshold_discount_groups: + T::Array[ + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).void + end + attr_writer :threshold_discount_groups + + # Configuration for matrix_with_threshold_discounts pricing + sig do + params( + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] ).returns(T.attached_class) end def self.new( - # The amount of credits granted per active license per cadence. - amount:, - # The currency of the license allocation. - currency:, - # When True, overage beyond the allocation is written off. - write_off_overage: nil + # Unit price used for usage that does not match any defined matrix cell. + default_unit_amount:, + # First matrix dimension key. + first_dimension:, + # Per-cell unit prices. + matrix_values:, + # Optional second matrix dimension key. + second_dimension: nil, + threshold_discount_groups: nil ) end sig do override.returns( { - amount: String, - currency: String, - write_off_overage: T.nilable(T::Boolean) + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] } ) end def to_hash end - 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 + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end - sig do - params( - bulk_with_filters_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void + sig { returns(String) } + attr_accessor :first_dimension_value + + sig { returns(String) } + attr_accessor :unit_amount + + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension_value + + sig do + params( + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + first_dimension_value:, + unit_amount:, + second_dimension_value: nil + ) + end + + sig do + override.returns( + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + } + ) + end + def to_hash + end + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup, + Orb::Internal::AnyHash + ) + end + + # Discount rate applied to spend above the threshold. + sig { returns(String) } + attr_accessor :above_threshold_discount_percentage + + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + sig { returns(String) } + attr_accessor :below_threshold_discount_percentage + + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + sig { returns(String) } + attr_accessor :cell_coordinates + + sig { returns(String) } + attr_accessor :threshold_amount + + sig { returns(T.nilable(String)) } + attr_accessor :description + + sig do + params( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Discount rate applied to spend above the threshold. + above_threshold_discount_percentage:, + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + below_threshold_discount_percentage:, + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + cell_coordinates:, + threshold_amount:, + description: nil + ) + end + + sig do + override.returns( + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + } + ) + end + def to_hash + end + end end - attr_writer :bulk_with_filters_config + end + + class TieredWithProration < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PlanCreateParams::Price::Price::TieredWithProration, + Orb::Internal::AnyHash + ) + end # The cadence to bill for this price on. sig do returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol + Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::OrSymbol ) end attr_accessor :cadence @@ -1645,18 +1833,6 @@ module Orb sig { returns(String) } attr_accessor :item_id - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ] - ) - end - attr_accessor :license_allocations - # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -1665,6 +1841,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for tiered_with_proration pricing + sig do + returns( + Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig + ) + end + attr_reader :tiered_with_proration_config + + sig do + params( + tiered_with_proration_config: + Orb::PlanCreateParams::Price::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)) } @@ -1765,16 +1957,12 @@ module Orb sig do params( - bulk_with_filters_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, + Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation::OrHash - ], name: String, + tiered_with_proration_config: + Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1802,18 +1990,14 @@ module Orb ).returns(T.attached_class) end def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, # The cadence to bill for this price on. cadence:, # The id of the item the price will be associated with. item_id:, - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. - license_allocations:, # The name of the price. name:, + # Configuration for tiered_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, @@ -1852,24 +2036,20 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :bulk_with_filters + model_type: :tiered_with_proration ) end sig do override.returns( { - bulk_with_filters_config: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, + Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, - license_allocations: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation - ], model_type: Symbol, name: String, + tiered_with_proration_config: + Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1899,52 +2079,93 @@ module Orb def to_hash end - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = T.type_alias do - T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash + T.all( + Symbol, + Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence ) end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol + ) - # Property filters to apply (all must match) sig do - returns( + override.returns( T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter + Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol ] ) end - attr_accessor :filters + def self.values + end + end - # Bulk tiers for rating based on total usage volume + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier + Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier ] ) end attr_accessor :tiers - # Configuration for bulk_with_filters pricing + # Configuration for tiered_with_proration pricing sig do params( - filters: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], tiers: T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash ] ).returns(T.attached_class) end def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume + # Tiers for rating based on total usage quantities into the specified tier with + # proration tiers: ) end @@ -1952,13 +2173,9 @@ module Orb sig do override.returns( { - filters: - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter - ], tiers: T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier + Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier ] } ) @@ -1966,200 +2183,53 @@ module Orb def to_hash end - class Filter < Orb::Internal::Type::BaseModel + class Tier < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier, Orb::Internal::AnyHash ) end - # Event property key to filter on + # Inclusive tier starting value sig { returns(String) } - attr_accessor :property_key + attr_accessor :tier_lower_bound - # Event property value to match + # Amount per unit sig { returns(String) } - attr_accessor :property_value + attr_accessor :unit_amount - # Configuration for a single property filter + # Configuration for a single tiered with proration tier sig do - params(property_key: String, property_value: String).returns( + params(tier_lower_bound: String, unit_amount: String).returns( T.attached_class ) end def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: + # Inclusive tier starting value + tier_lower_bound:, + # Amount per unit + unit_amount: ) end sig do override.returns( - { property_key: String, property_value: String } + { tier_lower_bound: String, unit_amount: String } ) end def to_hash end end + 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 + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package, + Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, Orb::Internal::AnyHash ) end @@ -2167,26 +2237,30 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence::OrSymbol + Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol ) end attr_accessor :cadence - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id - - # License allocations to associate with this price. Each entry defines a - # per-license credit pool granted each cadence. Requires license_type_id or - # license_type_configuration to be set. + # Configuration for grouped_with_min_max_thresholds pricing sig do returns( - T::Array[ - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::LicenseAllocation - ] + Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig ) end - attr_accessor :license_allocations + attr_reader :grouped_with_min_max_thresholds_config + + sig do + params( + grouped_with_min_max_thresholds_config: + Orb::PlanCreateParams::Price::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) } @@ -2196,13 +2270,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for package pricing - sig { returns(Orb::PackageConfig) } - attr_reader :package_config - - sig { params(package_config: Orb::PackageConfig::OrHash).void } - attr_writer :package_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -2304,14 +2371,11 @@ module Orb sig do params( cadence: - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::Cadence::OrSymbol, + Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, 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: @@ -2327,13042 +2391,105 @@ module Orb currency: T.nilable(String), dimensional_price_configuration: T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_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 - - Variants = - T.type_alias do - T.any( - Orb::NewPlanUnitPrice, - Orb::NewPlanTieredPrice, - Orb::NewPlanBulkPrice, - Orb::PlanCreateParams::Price::Price::BulkWithFilters, - Orb::NewPlanPackagePrice, - Orb::NewPlanMatrixPrice, - Orb::NewPlanThresholdTotalAmountPrice, - Orb::NewPlanTieredPackagePrice, - Orb::NewPlanTieredWithMinimumPrice, - Orb::NewPlanGroupedTieredPrice, - Orb::NewPlanTieredPackageWithMinimumPrice, - Orb::NewPlanPackageWithAllocationPrice, - Orb::NewPlanUnitWithPercentPrice, - Orb::NewPlanMatrixWithAllocationPrice, - Orb::PlanCreateParams::Price::Price::TieredWithProration, - Orb::NewPlanUnitWithProrationPrice, - Orb::NewPlanGroupedAllocationPrice, - Orb::NewPlanBulkWithProrationPrice, - Orb::NewPlanGroupedWithProratedMinimumPrice, - Orb::NewPlanGroupedWithMeteredMinimumPrice, - Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, - Orb::NewPlanMatrixWithDisplayNamePrice, - Orb::NewPlanGroupedTieredPackagePrice, - Orb::NewPlanMaxGroupTieredPackagePrice, - Orb::NewPlanScalableMatrixWithUnitPricingPrice, - Orb::NewPlanScalableMatrixWithTieredPricingPrice, - Orb::NewPlanCumulativeGroupedBulkPrice, - Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, - Orb::NewPlanMinimumCompositePrice, - Orb::PlanCreateParams::Price::Price::Percent, - Orb::PlanCreateParams::Price::Price::EventOutput - ) - end - - class BulkWithFilters < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::Price::BulkWithFilters, - Orb::Internal::AnyHash - ) - end - - # Configuration for bulk_with_filters pricing - sig do - returns( - Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig - ) - end - attr_reader :bulk_with_filters_config - - sig do - params( - bulk_with_filters_config: - Orb::PlanCreateParams::Price::Price::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::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::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, - cadence: - Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: - Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash - ) - end - - # Property filters to apply (all must match) - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - ) - end - attr_accessor :filters - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_filters pricing - sig do - params( - filters: - T::Array[ - Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], - tiers: - T::Array[ - Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ], - tiers: - T::Array[ - Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - } - ) - end - def to_hash - end - - class Filter < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::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 + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_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( - { unit_amount: String, tier_lower_bound: T.nilable(String) } - ) - end - def to_hash - end - end + sig do + override.returns( + { + cadence: + Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::PlanCreateParams::Price::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. @@ -15373,7 +2500,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::PlanCreateParams::Price::Price::BulkWithFilters::Cadence + Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -15381,51 +2508,111 @@ module Orb ANNUAL = T.let( :annual, - Orb::PlanCreateParams::Price::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::PlanCreateParams::Price::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::PlanCreateParams::Price::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::PlanCreateParams::Price::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::PlanCreateParams::Price::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::PlanCreateParams::Price::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::PlanCreateParams::Price::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::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::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 TieredWithProration < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PlanCreateParams::Price::Price::TieredWithProration, + Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, Orb::Internal::AnyHash ) end @@ -15433,11 +2620,27 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::OrSymbol + Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::OrSymbol ) end attr_accessor :cadence + # Configuration for cumulative_grouped_allocation pricing + sig do + returns( + Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + ) + end + attr_reader :cumulative_grouped_allocation_config + + sig do + params( + cumulative_grouped_allocation_config: + Orb::PlanCreateParams::Price::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 @@ -15450,22 +2653,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::PlanCreateParams::Price::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)) } @@ -15567,11 +2754,11 @@ module Orb sig do params( cadence: - Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::OrSymbol, + Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, item_id: String, name: String, - tiered_with_proration_config: - Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -15601,12 +2788,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for cumulative_grouped_allocation pricing + cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, # 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, @@ -15645,7 +2832,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered_with_proration + model_type: :cumulative_grouped_allocation ) end @@ -15653,12 +2840,12 @@ module Orb override.returns( { cadence: - Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::OrSymbol, + Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, model_type: Symbol, name: String, - tiered_with_proration_config: - Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -15696,7 +2883,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence + Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -15704,38 +2891,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ] ) end @@ -15743,102 +2930,72 @@ module Orb end end - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig, + Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, 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::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers + # The overall allocation across all groups + sig { returns(String) } + attr_accessor :cumulative_allocation - # Configuration for tiered_with_proration pricing + # 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( - tiers: - T::Array[ - Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String ).returns(T.attached_class) end def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: + # The 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( { - tiers: - T::Array[ - Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } ) end def to_hash end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PlanCreateParams::Price::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 DailyCreditAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds, + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -15846,26 +3003,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for daily_credit_allowance pricing sig do returns( - Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig ) end - attr_reader :grouped_with_min_max_thresholds_config + attr_reader :daily_credit_allowance_config sig do params( - grouped_with_min_max_thresholds_config: - Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + daily_credit_allowance_config: + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash ).void end - attr_writer :grouped_with_min_max_thresholds_config + attr_writer :daily_credit_allowance_config # The id of the item the price will be associated with. sig { returns(String) } @@ -15980,9 +3137,9 @@ module Orb sig do params( cadence: - Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -16014,8 +3171,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -16058,7 +3215,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :grouped_with_min_max_thresholds + model_type: :daily_credit_allowance ) end @@ -16066,9 +3223,9 @@ module Orb override.returns( { cadence: - Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, model_type: Symbol, name: String, @@ -16109,7 +3266,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -16117,38 +3274,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -16156,72 +3313,144 @@ module Orb end end - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # The event property used to group before applying thresholds + # Credits granted per day. Lose-it-or-use-it; does not roll over. sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :daily_allowance - # The maximum amount to charge each group + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value sig { returns(String) } - attr_accessor :maximum_charge + attr_accessor :default_unit_amount - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions - # The base price charged per group + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. sig { returns(String) } - attr_accessor :per_unit_rate + attr_accessor :event_day_property - # Configuration for grouped_with_min_max_thresholds pricing + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing sig do params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] ).returns(T.attached_class) end def self.new( - # 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: + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end sig do override.returns( { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] } ) end def to_hash end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation, + Orb::PlanCreateParams::Price::Price::MeteredAllowance, Orb::Internal::AnyHash ) end @@ -16229,30 +3458,30 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::OrSymbol + Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for cumulative_grouped_allocation pricing + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for metered_allowance pricing sig do returns( - Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig ) end - attr_reader :cumulative_grouped_allocation_config + attr_reader :metered_allowance_config sig do params( - cumulative_grouped_allocation_config: - Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + metered_allowance_config: + Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig::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 + attr_writer :metered_allowance_config # The pricing model type sig { returns(Symbol) } @@ -16363,10 +3592,10 @@ module Orb sig do params( cadence: - Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, + Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -16397,10 +3626,10 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, # The name of the price. name:, # The id of the billable metric for the price. Only needed if the price is @@ -16441,7 +3670,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :cumulative_grouped_allocation + model_type: :metered_allowance ) end @@ -16449,10 +3678,10 @@ module Orb override.returns( { cadence: - Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -16492,7 +3721,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence + Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -16500,38 +3729,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::TaggedSymbol ] ) end @@ -16539,59 +3768,91 @@ module Orb end end - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig, Orb::Internal::AnyHash ) end - # The overall allocation across all groups + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. sig { returns(String) } - attr_accessor :cumulative_allocation + attr_accessor :allowance_grouping_value - # The allocation per individual group + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. sig { returns(String) } - attr_accessor :group_allocation + attr_accessor :consumption_grouping_value - # The event property used to group usage before applying allocations + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. sig { returns(String) } attr_accessor :grouping_key - # The amount to charge for each unit outside of the allocation + # Per-unit price applied to gross consumption and to the allowance credit. sig { returns(String) } attr_accessor :unit_amount - # Configuration for cumulative_grouped_allocation pricing + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing sig do params( - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String ).returns(T.attached_class) end def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil ) end sig do override.returns( { - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } ) end diff --git a/rbi/orb/models/plan_update_params.rbi b/rbi/orb/models/plan_update_params.rbi index cb9b71e5..341ef514 100644 --- a/rbi/orb/models/plan_update_params.rbi +++ b/rbi/orb/models/plan_update_params.rbi @@ -12,6 +12,10 @@ module Orb sig { returns(String) } attr_accessor :plan_id + # An optional user-defined description of the plan. + sig { returns(T.nilable(String)) } + attr_accessor :description + # An optional user-defined ID for this plan resource, used throughout the system # as an alias for this Plan. Use this field to identify a plan by an existing # identifier in your system. @@ -27,6 +31,7 @@ module Orb sig do params( plan_id: String, + description: T.nilable(String), external_plan_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: Orb::RequestOptions::OrHash @@ -34,6 +39,8 @@ module Orb end def self.new( plan_id:, + # An optional user-defined description of the plan. + description: nil, # An optional user-defined ID for this plan resource, used throughout the system # as an alias for this Plan. Use this field to identify a plan by an existing # identifier in your system. @@ -50,6 +57,7 @@ module Orb override.returns( { plan_id: String, + description: T.nilable(String), external_plan_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: Orb::RequestOptions diff --git a/rbi/orb/models/plan_version.rbi b/rbi/orb/models/plan_version.rbi index ecce6a23..55a4e996 100644 --- a/rbi/orb/models/plan_version.rbi +++ b/rbi/orb/models/plan_version.rbi @@ -57,6 +57,7 @@ module Orb Orb::Price::PackageWithAllocation::OrHash, Orb::Price::UnitWithPercent::OrHash, Orb::Price::MatrixWithAllocation::OrHash, + Orb::Price::MatrixWithThresholdDiscounts::OrHash, Orb::Price::TieredWithProration::OrHash, Orb::Price::UnitWithProration::OrHash, Orb::Price::GroupedAllocation::OrHash, @@ -71,6 +72,8 @@ module Orb Orb::Price::ScalableMatrixWithTieredPricing::OrHash, Orb::Price::CumulativeGroupedBulk::OrHash, Orb::Price::CumulativeGroupedAllocation::OrHash, + Orb::Price::DailyCreditAllowance::OrHash, + Orb::Price::MeteredAllowance::OrHash, Orb::Price::MinimumComposite::OrHash, Orb::Price::Percent::OrHash, Orb::Price::EventOutput::OrHash diff --git a/rbi/orb/models/plans/external_plan_id_update_params.rbi b/rbi/orb/models/plans/external_plan_id_update_params.rbi index 5e661cb8..563d10a4 100644 --- a/rbi/orb/models/plans/external_plan_id_update_params.rbi +++ b/rbi/orb/models/plans/external_plan_id_update_params.rbi @@ -18,6 +18,10 @@ module Orb sig { returns(String) } attr_accessor :other_external_plan_id + # An optional user-defined description of the plan. + sig { returns(T.nilable(String)) } + attr_accessor :description + # An optional user-defined ID for this plan resource, used throughout the system # as an alias for this Plan. Use this field to identify a plan by an existing # identifier in your system. @@ -33,6 +37,7 @@ module Orb sig do params( other_external_plan_id: String, + description: T.nilable(String), external_plan_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: Orb::RequestOptions::OrHash @@ -40,6 +45,8 @@ module Orb end def self.new( other_external_plan_id:, + # An optional user-defined description of the plan. + description: nil, # An optional user-defined ID for this plan resource, used throughout the system # as an alias for this Plan. Use this field to identify a plan by an existing # identifier in your system. @@ -56,6 +63,7 @@ module Orb override.returns( { other_external_plan_id: String, + description: T.nilable(String), external_plan_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: Orb::RequestOptions diff --git a/rbi/orb/models/plans/migration_cancel_response.rbi b/rbi/orb/models/plans/migration_cancel_response.rbi index 055f2160..af7b7b3a 100644 --- a/rbi/orb/models/plans/migration_cancel_response.rbi +++ b/rbi/orb/models/plans/migration_cancel_response.rbi @@ -12,9 +12,12 @@ module Orb ) end + # Unique identifier for this plan version change. sig { returns(String) } attr_accessor :id + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. sig do returns( T.nilable( @@ -24,9 +27,12 @@ module Orb end attr_accessor :effective_time + # The ID of the plan being migrated. sig { returns(String) } attr_accessor :plan_id + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. sig do returns( Orb::Models::Plans::MigrationCancelResponse::Status::TaggedSymbol @@ -50,7 +56,18 @@ module Orb Orb::Models::Plans::MigrationCancelResponse::Status::OrSymbol ).returns(T.attached_class) end - def self.new(id:, effective_time:, plan_id:, status:) + def self.new( + # Unique identifier for this plan version change. + id:, + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. + effective_time:, + # The ID of the plan being migrated. + plan_id:, + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. + status: + ) end sig do @@ -70,6 +87,8 @@ module Orb def to_hash end + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. module EffectiveTime extend Orb::Internal::Type::Union @@ -108,6 +127,8 @@ module Orb ) end + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. module Status extend Orb::Internal::Type::Enum diff --git a/rbi/orb/models/plans/migration_list_response.rbi b/rbi/orb/models/plans/migration_list_response.rbi index 03fa10aa..a62cd154 100644 --- a/rbi/orb/models/plans/migration_list_response.rbi +++ b/rbi/orb/models/plans/migration_list_response.rbi @@ -12,9 +12,12 @@ module Orb ) end + # Unique identifier for this plan version change. sig { returns(String) } attr_accessor :id + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. sig do returns( T.nilable( @@ -24,9 +27,12 @@ module Orb end attr_accessor :effective_time + # The ID of the plan being migrated. sig { returns(String) } attr_accessor :plan_id + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. sig do returns( Orb::Models::Plans::MigrationListResponse::Status::TaggedSymbol @@ -49,7 +55,18 @@ module Orb status: Orb::Models::Plans::MigrationListResponse::Status::OrSymbol ).returns(T.attached_class) end - def self.new(id:, effective_time:, plan_id:, status:) + def self.new( + # Unique identifier for this plan version change. + id:, + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. + effective_time:, + # The ID of the plan being migrated. + plan_id:, + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. + status: + ) end sig do @@ -69,6 +86,8 @@ module Orb def to_hash end + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. module EffectiveTime extend Orb::Internal::Type::Union @@ -107,6 +126,8 @@ module Orb ) end + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. module Status extend Orb::Internal::Type::Enum diff --git a/rbi/orb/models/plans/migration_retrieve_response.rbi b/rbi/orb/models/plans/migration_retrieve_response.rbi index 738368d1..1b6d4bd6 100644 --- a/rbi/orb/models/plans/migration_retrieve_response.rbi +++ b/rbi/orb/models/plans/migration_retrieve_response.rbi @@ -12,9 +12,12 @@ module Orb ) end + # Unique identifier for this plan version change. sig { returns(String) } attr_accessor :id + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. sig do returns( T.nilable( @@ -24,9 +27,12 @@ module Orb end attr_accessor :effective_time + # The ID of the plan being migrated. sig { returns(String) } attr_accessor :plan_id + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. sig do returns( Orb::Models::Plans::MigrationRetrieveResponse::Status::TaggedSymbol @@ -50,7 +56,18 @@ module Orb Orb::Models::Plans::MigrationRetrieveResponse::Status::OrSymbol ).returns(T.attached_class) end - def self.new(id:, effective_time:, plan_id:, status:) + def self.new( + # Unique identifier for this plan version change. + id:, + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. + effective_time:, + # The ID of the plan being migrated. + plan_id:, + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. + status: + ) end sig do @@ -70,6 +87,8 @@ module Orb def to_hash end + # When the migration takes effect. Can be a specific date/time, or 'end_of_term' + # when scheduled to be at the end of the current billing period. module EffectiveTime extend Orb::Internal::Type::Union @@ -108,6 +127,8 @@ module Orb ) end + # Current status of the migration: 'not_started', 'in_progress', 'completed', + # 'action_needed', or 'canceled'. module Status extend Orb::Internal::Type::Enum diff --git a/rbi/orb/models/price.rbi b/rbi/orb/models/price.rbi index e858b9ef..9a4d11c0 100644 --- a/rbi/orb/models/price.rbi +++ b/rbi/orb/models/price.rbi @@ -32,6 +32,7 @@ module Orb Orb::Price::PackageWithAllocation, Orb::Price::UnitWithPercent, Orb::Price::MatrixWithAllocation, + Orb::Price::MatrixWithThresholdDiscounts, Orb::Price::TieredWithProration, Orb::Price::UnitWithProration, Orb::Price::GroupedAllocation, @@ -46,6 +47,8 @@ module Orb Orb::Price::ScalableMatrixWithTieredPricing, Orb::Price::CumulativeGroupedBulk, Orb::Price::CumulativeGroupedAllocation, + Orb::Price::DailyCreditAllowance, + Orb::Price::MeteredAllowance, Orb::Price::MinimumComposite, Orb::Price::Percent, Orb::Price::EventOutput @@ -9394,10 +9397,13 @@ module Orb end end - class TieredWithProration < Orb::Internal::Type::BaseModel + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel OrHash = T.type_alias do - T.any(Orb::Price::TieredWithProration, Orb::Internal::AnyHash) + T.any( + Orb::Price::MatrixWithThresholdDiscounts, + Orb::Internal::AnyHash + ) end sig { returns(String) } @@ -9424,17 +9430,25 @@ module Orb attr_writer :billing_cycle_configuration sig do - returns(Orb::Price::TieredWithProration::BillingMode::TaggedSymbol) + returns( + Orb::Price::MatrixWithThresholdDiscounts::BillingMode::TaggedSymbol + ) end attr_accessor :billing_mode - sig { returns(Orb::Price::TieredWithProration::Cadence::TaggedSymbol) } + sig do + returns( + Orb::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + end attr_accessor :cadence sig do returns( T.nilable( - T::Array[Orb::Price::TieredWithProration::CompositePriceFilter] + T::Array[ + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter + ] ) ) end @@ -9446,7 +9460,7 @@ module Orb sig do returns( T.nilable( - Orb::Price::TieredWithProration::ConversionRateConfig::Variants + Orb::Price::MatrixWithThresholdDiscounts::ConversionRateConfig::Variants ) ) end @@ -9497,6 +9511,22 @@ module Orb sig { params(item: Orb::ItemSlim::OrHash).void } attr_writer :item + # Configuration for matrix_with_threshold_discounts pricing + sig do + returns( + Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + ) + end + attr_reader :matrix_with_threshold_discounts_config + + sig do + params( + matrix_with_threshold_discounts_config: + Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash + ).void + end + attr_writer :matrix_with_threshold_discounts_config + sig { returns(T.nilable(Orb::Maximum)) } attr_reader :maximum @@ -9533,7 +9563,9 @@ module Orb attr_accessor :plan_phase_order sig do - returns(Orb::Price::TieredWithProration::PriceType::TaggedSymbol) + returns( + Orb::Price::MatrixWithThresholdDiscounts::PriceType::TaggedSymbol + ) end attr_accessor :price_type @@ -9542,20 +9574,6 @@ module Orb sig { returns(T.nilable(String)) } attr_accessor :replaces_price_id - # Configuration for tiered_with_proration pricing - sig do - returns(Orb::Price::TieredWithProration::TieredWithProrationConfig) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::Price::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - sig { returns(T.nilable(Orb::DimensionalPriceConfiguration)) } attr_reader :dimensional_price_configuration @@ -9570,13 +9588,19 @@ module Orb # The LicenseType resource represents a type of license that can be assigned to # users. License types are used during billing by grouping metrics on the # configured grouping key. - sig { returns(T.nilable(Orb::Price::TieredWithProration::LicenseType)) } + sig do + returns( + T.nilable(Orb::Price::MatrixWithThresholdDiscounts::LicenseType) + ) + end attr_reader :license_type sig do params( license_type: - T.nilable(Orb::Price::TieredWithProration::LicenseType::OrHash) + T.nilable( + Orb::Price::MatrixWithThresholdDiscounts::LicenseType::OrHash + ) ).void end attr_writer :license_type @@ -9587,12 +9611,13 @@ module Orb billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash), billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash, billing_mode: - Orb::Price::TieredWithProration::BillingMode::OrSymbol, - cadence: Orb::Price::TieredWithProration::Cadence::OrSymbol, + Orb::Price::MatrixWithThresholdDiscounts::BillingMode::OrSymbol, + cadence: + Orb::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, composite_price_filters: T.nilable( T::Array[ - Orb::Price::TieredWithProration::CompositePriceFilter::OrHash + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::OrHash ] ), conversion_rate: T.nilable(Float), @@ -9621,6 +9646,8 @@ module Orb invoicing_cycle_configuration: T.nilable(Orb::BillingCycleConfiguration::OrHash), item: Orb::ItemSlim::OrHash, + matrix_with_threshold_discounts_config: + Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash, maximum: T.nilable(Orb::Maximum::OrHash), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], @@ -9628,14 +9655,15 @@ module Orb minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), - price_type: Orb::Price::TieredWithProration::PriceType::OrSymbol, + price_type: + Orb::Price::MatrixWithThresholdDiscounts::PriceType::OrSymbol, replaces_price_id: T.nilable(String), - tiered_with_proration_config: - Orb::Price::TieredWithProration::TieredWithProrationConfig::OrHash, dimensional_price_configuration: T.nilable(Orb::DimensionalPriceConfiguration::OrHash), license_type: - T.nilable(Orb::Price::TieredWithProration::LicenseType::OrHash), + T.nilable( + Orb::Price::MatrixWithThresholdDiscounts::LicenseType::OrHash + ), model_type: Symbol ).returns(T.attached_class) end @@ -9659,6 +9687,8 @@ module Orb # A minimal representation of an Item containing only the essential identifying # information. item:, + # Configuration for matrix_with_threshold_discounts pricing + matrix_with_threshold_discounts_config:, maximum:, maximum_amount:, # User specified key-value pairs for the resource. If not present, this defaults @@ -9674,15 +9704,13 @@ module Orb # The price id this price replaces. This price will take the place of the replaced # price in plan version migrations. replaces_price_id:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, dimensional_price_configuration: nil, # The LicenseType resource represents a type of license that can be assigned to # users. License types are used during billing by grouping metrics on the # configured grouping key. license_type: nil, # The pricing model type - model_type: :tiered_with_proration + model_type: :matrix_with_threshold_discounts ) end @@ -9693,18 +9721,19 @@ module Orb billable_metric: T.nilable(Orb::BillableMetricTiny), billing_cycle_configuration: Orb::BillingCycleConfiguration, billing_mode: - Orb::Price::TieredWithProration::BillingMode::TaggedSymbol, - cadence: Orb::Price::TieredWithProration::Cadence::TaggedSymbol, + Orb::Price::MatrixWithThresholdDiscounts::BillingMode::TaggedSymbol, + cadence: + Orb::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol, composite_price_filters: T.nilable( T::Array[ - Orb::Price::TieredWithProration::CompositePriceFilter + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter ] ), conversion_rate: T.nilable(Float), conversion_rate_config: T.nilable( - Orb::Price::TieredWithProration::ConversionRateConfig::Variants + Orb::Price::MatrixWithThresholdDiscounts::ConversionRateConfig::Variants ), created_at: Time, credit_allocation: T.nilable(Orb::Allocation), @@ -9716,6 +9745,8 @@ module Orb invoicing_cycle_configuration: T.nilable(Orb::BillingCycleConfiguration), item: Orb::ItemSlim, + matrix_with_threshold_discounts_config: + Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, maximum: T.nilable(Orb::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], @@ -9725,14 +9756,12 @@ module Orb name: String, plan_phase_order: T.nilable(Integer), price_type: - Orb::Price::TieredWithProration::PriceType::TaggedSymbol, + Orb::Price::MatrixWithThresholdDiscounts::PriceType::TaggedSymbol, replaces_price_id: T.nilable(String), - tiered_with_proration_config: - Orb::Price::TieredWithProration::TieredWithProrationConfig, dimensional_price_configuration: T.nilable(Orb::DimensionalPriceConfiguration), license_type: - T.nilable(Orb::Price::TieredWithProration::LicenseType) + T.nilable(Orb::Price::MatrixWithThresholdDiscounts::LicenseType) } ) end @@ -9744,25 +9773,28 @@ module Orb TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::TieredWithProration::BillingMode) + T.all( + Symbol, + Orb::Price::MatrixWithThresholdDiscounts::BillingMode + ) end OrSymbol = T.type_alias { T.any(Symbol, String) } IN_ADVANCE = T.let( :in_advance, - Orb::Price::TieredWithProration::BillingMode::TaggedSymbol + Orb::Price::MatrixWithThresholdDiscounts::BillingMode::TaggedSymbol ) IN_ARREAR = T.let( :in_arrear, - Orb::Price::TieredWithProration::BillingMode::TaggedSymbol + Orb::Price::MatrixWithThresholdDiscounts::BillingMode::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::TieredWithProration::BillingMode::TaggedSymbol + Orb::Price::MatrixWithThresholdDiscounts::BillingMode::TaggedSymbol ] ) end @@ -9775,44 +9807,46 @@ module Orb TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::TieredWithProration::Cadence) + T.all(Symbol, Orb::Price::MatrixWithThresholdDiscounts::Cadence) end OrSymbol = T.type_alias { T.any(Symbol, String) } ONE_TIME = T.let( :one_time, - Orb::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) ANNUAL = T.let( :annual, - Orb::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) sig do override.returns( - T::Array[Orb::Price::TieredWithProration::Cadence::TaggedSymbol] + T::Array[ + Orb::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ] ) end def self.values @@ -9823,7 +9857,7 @@ module Orb OrHash = T.type_alias do T.any( - Orb::Price::TieredWithProration::CompositePriceFilter, + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter, Orb::Internal::AnyHash ) end @@ -9831,7 +9865,7 @@ module Orb # The property of the price to filter on. sig do returns( - Orb::Price::TieredWithProration::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Field::TaggedSymbol ) end attr_accessor :field @@ -9839,7 +9873,7 @@ module Orb # Should prices that match the filter be included or excluded. sig do returns( - Orb::Price::TieredWithProration::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Operator::TaggedSymbol ) end attr_accessor :operator @@ -9851,9 +9885,9 @@ module Orb sig do params( field: - Orb::Price::TieredWithProration::CompositePriceFilter::Field::OrSymbol, + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Field::OrSymbol, operator: - Orb::Price::TieredWithProration::CompositePriceFilter::Operator::OrSymbol, + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Operator::OrSymbol, values: T::Array[String] ).returns(T.attached_class) end @@ -9871,9 +9905,9 @@ module Orb override.returns( { field: - Orb::Price::TieredWithProration::CompositePriceFilter::Field::TaggedSymbol, + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Field::TaggedSymbol, operator: - Orb::Price::TieredWithProration::CompositePriceFilter::Operator::TaggedSymbol, + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Operator::TaggedSymbol, values: T::Array[String] } ) @@ -9889,7 +9923,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::TieredWithProration::CompositePriceFilter::Field + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Field ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -9897,33 +9931,33 @@ module Orb PRICE_ID = T.let( :price_id, - Orb::Price::TieredWithProration::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Field::TaggedSymbol ) ITEM_ID = T.let( :item_id, - Orb::Price::TieredWithProration::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Field::TaggedSymbol ) PRICE_TYPE = T.let( :price_type, - Orb::Price::TieredWithProration::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Field::TaggedSymbol ) CURRENCY = T.let( :currency, - Orb::Price::TieredWithProration::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Field::TaggedSymbol ) PRICING_UNIT_ID = T.let( :pricing_unit_id, - Orb::Price::TieredWithProration::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Field::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::TieredWithProration::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Field::TaggedSymbol ] ) end @@ -9939,7 +9973,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::TieredWithProration::CompositePriceFilter::Operator + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Operator ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -9947,18 +9981,18 @@ module Orb INCLUDES = T.let( :includes, - Orb::Price::TieredWithProration::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Operator::TaggedSymbol ) EXCLUDES = T.let( :excludes, - Orb::Price::TieredWithProration::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Operator::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::TieredWithProration::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::Operator::TaggedSymbol ] ) end @@ -9967,82 +10001,100 @@ module Orb end end - module PriceType - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, Orb::Price::TieredWithProration::PriceType) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - USAGE_PRICE = - T.let( - :usage_price, - Orb::Price::TieredWithProration::PriceType::TaggedSymbol - ) - FIXED_PRICE = - T.let( - :fixed_price, - Orb::Price::TieredWithProration::PriceType::TaggedSymbol - ) - COMPOSITE_PRICE = - T.let( - :composite_price, - Orb::Price::TieredWithProration::PriceType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[Orb::Price::TieredWithProration::PriceType::TaggedSymbol] - ) - end - def self.values - end - end - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Price::TieredWithProration::TieredWithProrationConfig, + Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, Orb::Internal::AnyHash ) end - # Tiers for rating based on total usage quantities into the specified tier with - # proration + # Unit price used for usage that does not match any defined matrix cell. + sig { returns(String) } + attr_accessor :default_unit_amount + + # First matrix dimension key. + sig { returns(String) } + attr_accessor :first_dimension + + # Per-cell unit prices. sig do returns( T::Array[ - Orb::Price::TieredWithProration::TieredWithProrationConfig::Tier + Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue ] ) end - attr_accessor :tiers + attr_accessor :matrix_values + + # Optional second matrix dimension key. + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension + + sig do + returns( + T.nilable( + T::Array[ + Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + ) + ) + end + attr_reader :threshold_discount_groups - # Configuration for tiered_with_proration pricing sig do params( - tiers: + threshold_discount_groups: T::Array[ - Orb::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash + Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).void + end + attr_writer :threshold_discount_groups + + # Configuration for matrix_with_threshold_discounts pricing + sig do + params( + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash ] ).returns(T.attached_class) end def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: + # Unit price used for usage that does not match any defined matrix cell. + default_unit_amount:, + # First matrix dimension key. + first_dimension:, + # Per-cell unit prices. + matrix_values:, + # Optional second matrix dimension key. + second_dimension: nil, + threshold_discount_groups: nil ) end sig do override.returns( { - tiers: + default_unit_amount: String, + first_dimension: String, + matrix_values: T::Array[ - Orb::Price::TieredWithProration::TieredWithProrationConfig::Tier + Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup ] } ) @@ -10050,79 +10102,189 @@ module Orb def to_hash end - class Tier < Orb::Internal::Type::BaseModel + class MatrixValue < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Price::TieredWithProration::TieredWithProrationConfig::Tier, + Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue, Orb::Internal::AnyHash ) end - # Inclusive tier starting value sig { returns(String) } - attr_accessor :tier_lower_bound + attr_accessor :first_dimension_value - # Amount per unit sig { returns(String) } attr_accessor :unit_amount - # Configuration for a single tiered with proration tier + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension_value + sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) + params( + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + ).returns(T.attached_class) end def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: + first_dimension_value:, + unit_amount:, + second_dimension_value: nil ) end sig do override.returns( - { tier_lower_bound: String, unit_amount: String } + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + } ) end def to_hash end end - end - class LicenseType < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Price::TieredWithProration::LicenseType, - Orb::Internal::AnyHash - ) - end + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup, + Orb::Internal::AnyHash + ) + end - # The Orb-assigned unique identifier for the license type. - sig { returns(String) } - attr_accessor :id + # Discount rate applied to spend above the threshold. + sig { returns(String) } + attr_accessor :above_threshold_discount_percentage - # The key used for grouping licenses of this type. This is typically a user - # identifier field. - sig { returns(String) } - attr_accessor :grouping_key + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + sig { returns(String) } + attr_accessor :below_threshold_discount_percentage - # The name of the license type. - sig { returns(String) } - attr_accessor :name + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + sig { returns(String) } + attr_accessor :cell_coordinates - # The LicenseType resource represents a type of license that can be assigned to - # users. License types are used during billing by grouping metrics on the - # configured grouping key. - sig do - params(id: String, grouping_key: String, name: String).returns( - T.attached_class - ) - end - def self.new( - # The Orb-assigned unique identifier for the license type. + sig { returns(String) } + attr_accessor :threshold_amount + + sig { returns(T.nilable(String)) } + attr_accessor :description + + sig do + params( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Discount rate applied to spend above the threshold. + above_threshold_discount_percentage:, + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + below_threshold_discount_percentage:, + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + cell_coordinates:, + threshold_amount:, + description: nil + ) + end + + sig do + override.returns( + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + module PriceType + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::Price::MatrixWithThresholdDiscounts::PriceType) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + USAGE_PRICE = + T.let( + :usage_price, + Orb::Price::MatrixWithThresholdDiscounts::PriceType::TaggedSymbol + ) + FIXED_PRICE = + T.let( + :fixed_price, + Orb::Price::MatrixWithThresholdDiscounts::PriceType::TaggedSymbol + ) + COMPOSITE_PRICE = + T.let( + :composite_price, + Orb::Price::MatrixWithThresholdDiscounts::PriceType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::MatrixWithThresholdDiscounts::PriceType::TaggedSymbol + ] + ) + end + def self.values + end + end + + class LicenseType < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::MatrixWithThresholdDiscounts::LicenseType, + Orb::Internal::AnyHash + ) + end + + # The Orb-assigned unique identifier for the license type. + sig { returns(String) } + attr_accessor :id + + # The key used for grouping licenses of this type. This is typically a user + # identifier field. + sig { returns(String) } + attr_accessor :grouping_key + + # The name of the license type. + sig { returns(String) } + attr_accessor :name + + # The LicenseType resource represents a type of license that can be assigned to + # users. License types are used during billing by grouping metrics on the + # configured grouping key. + sig do + params(id: String, grouping_key: String, name: String).returns( + T.attached_class + ) + end + def self.new( + # The Orb-assigned unique identifier for the license type. id:, # The key used for grouping licenses of this type. This is typically a user # identifier field. @@ -10140,10 +10302,10 @@ module Orb end end - class UnitWithProration < Orb::Internal::Type::BaseModel + class TieredWithProration < Orb::Internal::Type::BaseModel OrHash = T.type_alias do - T.any(Orb::Price::UnitWithProration, Orb::Internal::AnyHash) + T.any(Orb::Price::TieredWithProration, Orb::Internal::AnyHash) end sig { returns(String) } @@ -10170,17 +10332,17 @@ module Orb attr_writer :billing_cycle_configuration sig do - returns(Orb::Price::UnitWithProration::BillingMode::TaggedSymbol) + returns(Orb::Price::TieredWithProration::BillingMode::TaggedSymbol) end attr_accessor :billing_mode - sig { returns(Orb::Price::UnitWithProration::Cadence::TaggedSymbol) } + sig { returns(Orb::Price::TieredWithProration::Cadence::TaggedSymbol) } attr_accessor :cadence sig do returns( T.nilable( - T::Array[Orb::Price::UnitWithProration::CompositePriceFilter] + T::Array[Orb::Price::TieredWithProration::CompositePriceFilter] ) ) end @@ -10192,7 +10354,7 @@ module Orb sig do returns( T.nilable( - Orb::Price::UnitWithProration::ConversionRateConfig::Variants + Orb::Price::TieredWithProration::ConversionRateConfig::Variants ) ) end @@ -10278,7 +10440,9 @@ module Orb sig { returns(T.nilable(Integer)) } attr_accessor :plan_phase_order - sig { returns(Orb::Price::UnitWithProration::PriceType::TaggedSymbol) } + sig do + returns(Orb::Price::TieredWithProration::PriceType::TaggedSymbol) + end attr_accessor :price_type # The price id this price replaces. This price will take the place of the replaced @@ -10286,17 +10450,19 @@ module Orb sig { returns(T.nilable(String)) } attr_accessor :replaces_price_id - # Configuration for unit_with_proration pricing - sig { returns(Orb::Price::UnitWithProration::UnitWithProrationConfig) } - attr_reader :unit_with_proration_config + # Configuration for tiered_with_proration pricing + sig do + returns(Orb::Price::TieredWithProration::TieredWithProrationConfig) + end + attr_reader :tiered_with_proration_config sig do params( - unit_with_proration_config: - Orb::Price::UnitWithProration::UnitWithProrationConfig::OrHash + tiered_with_proration_config: + Orb::Price::TieredWithProration::TieredWithProrationConfig::OrHash ).void end - attr_writer :unit_with_proration_config + attr_writer :tiered_with_proration_config sig { returns(T.nilable(Orb::DimensionalPriceConfiguration)) } attr_reader :dimensional_price_configuration @@ -10312,13 +10478,13 @@ module Orb # The LicenseType resource represents a type of license that can be assigned to # users. License types are used during billing by grouping metrics on the # configured grouping key. - sig { returns(T.nilable(Orb::Price::UnitWithProration::LicenseType)) } + sig { returns(T.nilable(Orb::Price::TieredWithProration::LicenseType)) } attr_reader :license_type sig do params( license_type: - T.nilable(Orb::Price::UnitWithProration::LicenseType::OrHash) + T.nilable(Orb::Price::TieredWithProration::LicenseType::OrHash) ).void end attr_writer :license_type @@ -10328,12 +10494,13 @@ module Orb id: String, billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash), billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash, - billing_mode: Orb::Price::UnitWithProration::BillingMode::OrSymbol, - cadence: Orb::Price::UnitWithProration::Cadence::OrSymbol, + billing_mode: + Orb::Price::TieredWithProration::BillingMode::OrSymbol, + cadence: Orb::Price::TieredWithProration::Cadence::OrSymbol, composite_price_filters: T.nilable( T::Array[ - Orb::Price::UnitWithProration::CompositePriceFilter::OrHash + Orb::Price::TieredWithProration::CompositePriceFilter::OrHash ] ), conversion_rate: T.nilable(Float), @@ -10369,14 +10536,14 @@ module Orb minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), - price_type: Orb::Price::UnitWithProration::PriceType::OrSymbol, + price_type: Orb::Price::TieredWithProration::PriceType::OrSymbol, replaces_price_id: T.nilable(String), - unit_with_proration_config: - Orb::Price::UnitWithProration::UnitWithProrationConfig::OrHash, + tiered_with_proration_config: + Orb::Price::TieredWithProration::TieredWithProrationConfig::OrHash, dimensional_price_configuration: T.nilable(Orb::DimensionalPriceConfiguration::OrHash), license_type: - T.nilable(Orb::Price::UnitWithProration::LicenseType::OrHash), + T.nilable(Orb::Price::TieredWithProration::LicenseType::OrHash), model_type: Symbol ).returns(T.attached_class) end @@ -10415,15 +10582,15 @@ module Orb # The price id this price replaces. This price will take the place of the replaced # price in plan version migrations. replaces_price_id:, - # Configuration for unit_with_proration pricing - unit_with_proration_config:, + # Configuration for tiered_with_proration pricing + tiered_with_proration_config:, dimensional_price_configuration: nil, # The LicenseType resource represents a type of license that can be assigned to # users. License types are used during billing by grouping metrics on the # configured grouping key. license_type: nil, # The pricing model type - model_type: :unit_with_proration + model_type: :tiered_with_proration ) end @@ -10434,16 +10601,18 @@ module Orb billable_metric: T.nilable(Orb::BillableMetricTiny), billing_cycle_configuration: Orb::BillingCycleConfiguration, billing_mode: - Orb::Price::UnitWithProration::BillingMode::TaggedSymbol, - cadence: Orb::Price::UnitWithProration::Cadence::TaggedSymbol, + Orb::Price::TieredWithProration::BillingMode::TaggedSymbol, + cadence: Orb::Price::TieredWithProration::Cadence::TaggedSymbol, composite_price_filters: T.nilable( - T::Array[Orb::Price::UnitWithProration::CompositePriceFilter] + T::Array[ + Orb::Price::TieredWithProration::CompositePriceFilter + ] ), conversion_rate: T.nilable(Float), conversion_rate_config: T.nilable( - Orb::Price::UnitWithProration::ConversionRateConfig::Variants + Orb::Price::TieredWithProration::ConversionRateConfig::Variants ), created_at: Time, credit_allocation: T.nilable(Orb::Allocation), @@ -10464,14 +10633,14 @@ module Orb name: String, plan_phase_order: T.nilable(Integer), price_type: - Orb::Price::UnitWithProration::PriceType::TaggedSymbol, + Orb::Price::TieredWithProration::PriceType::TaggedSymbol, replaces_price_id: T.nilable(String), - unit_with_proration_config: - Orb::Price::UnitWithProration::UnitWithProrationConfig, + tiered_with_proration_config: + Orb::Price::TieredWithProration::TieredWithProrationConfig, dimensional_price_configuration: T.nilable(Orb::DimensionalPriceConfiguration), license_type: - T.nilable(Orb::Price::UnitWithProration::LicenseType) + T.nilable(Orb::Price::TieredWithProration::LicenseType) } ) end @@ -10483,24 +10652,26 @@ module Orb TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::UnitWithProration::BillingMode) + T.all(Symbol, Orb::Price::TieredWithProration::BillingMode) end OrSymbol = T.type_alias { T.any(Symbol, String) } IN_ADVANCE = T.let( :in_advance, - Orb::Price::UnitWithProration::BillingMode::TaggedSymbol + Orb::Price::TieredWithProration::BillingMode::TaggedSymbol ) IN_ARREAR = T.let( :in_arrear, - Orb::Price::UnitWithProration::BillingMode::TaggedSymbol + Orb::Price::TieredWithProration::BillingMode::TaggedSymbol ) sig do override.returns( - T::Array[Orb::Price::UnitWithProration::BillingMode::TaggedSymbol] + T::Array[ + Orb::Price::TieredWithProration::BillingMode::TaggedSymbol + ] ) end def self.values @@ -10512,38 +10683,44 @@ module Orb TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::UnitWithProration::Cadence) + T.all(Symbol, Orb::Price::TieredWithProration::Cadence) end OrSymbol = T.type_alias { T.any(Symbol, String) } ONE_TIME = T.let( :one_time, - Orb::Price::UnitWithProration::Cadence::TaggedSymbol + Orb::Price::TieredWithProration::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Price::UnitWithProration::Cadence::TaggedSymbol + Orb::Price::TieredWithProration::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Price::UnitWithProration::Cadence::TaggedSymbol + Orb::Price::TieredWithProration::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Price::UnitWithProration::Cadence::TaggedSymbol + Orb::Price::TieredWithProration::Cadence::TaggedSymbol ) ANNUAL = - T.let(:annual, Orb::Price::UnitWithProration::Cadence::TaggedSymbol) + T.let( + :annual, + Orb::Price::TieredWithProration::Cadence::TaggedSymbol + ) CUSTOM = - T.let(:custom, Orb::Price::UnitWithProration::Cadence::TaggedSymbol) + T.let( + :custom, + Orb::Price::TieredWithProration::Cadence::TaggedSymbol + ) sig do override.returns( - T::Array[Orb::Price::UnitWithProration::Cadence::TaggedSymbol] + T::Array[Orb::Price::TieredWithProration::Cadence::TaggedSymbol] ) end def self.values @@ -10554,7 +10731,7 @@ module Orb OrHash = T.type_alias do T.any( - Orb::Price::UnitWithProration::CompositePriceFilter, + Orb::Price::TieredWithProration::CompositePriceFilter, Orb::Internal::AnyHash ) end @@ -10562,7 +10739,7 @@ module Orb # The property of the price to filter on. sig do returns( - Orb::Price::UnitWithProration::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::TieredWithProration::CompositePriceFilter::Field::TaggedSymbol ) end attr_accessor :field @@ -10570,7 +10747,7 @@ module Orb # Should prices that match the filter be included or excluded. sig do returns( - Orb::Price::UnitWithProration::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::TieredWithProration::CompositePriceFilter::Operator::TaggedSymbol ) end attr_accessor :operator @@ -10582,9 +10759,9 @@ module Orb sig do params( field: - Orb::Price::UnitWithProration::CompositePriceFilter::Field::OrSymbol, + Orb::Price::TieredWithProration::CompositePriceFilter::Field::OrSymbol, operator: - Orb::Price::UnitWithProration::CompositePriceFilter::Operator::OrSymbol, + Orb::Price::TieredWithProration::CompositePriceFilter::Operator::OrSymbol, values: T::Array[String] ).returns(T.attached_class) end @@ -10602,9 +10779,9 @@ module Orb override.returns( { field: - Orb::Price::UnitWithProration::CompositePriceFilter::Field::TaggedSymbol, + Orb::Price::TieredWithProration::CompositePriceFilter::Field::TaggedSymbol, operator: - Orb::Price::UnitWithProration::CompositePriceFilter::Operator::TaggedSymbol, + Orb::Price::TieredWithProration::CompositePriceFilter::Operator::TaggedSymbol, values: T::Array[String] } ) @@ -10620,7 +10797,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::UnitWithProration::CompositePriceFilter::Field + Orb::Price::TieredWithProration::CompositePriceFilter::Field ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -10628,33 +10805,33 @@ module Orb PRICE_ID = T.let( :price_id, - Orb::Price::UnitWithProration::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::TieredWithProration::CompositePriceFilter::Field::TaggedSymbol ) ITEM_ID = T.let( :item_id, - Orb::Price::UnitWithProration::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::TieredWithProration::CompositePriceFilter::Field::TaggedSymbol ) PRICE_TYPE = T.let( :price_type, - Orb::Price::UnitWithProration::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::TieredWithProration::CompositePriceFilter::Field::TaggedSymbol ) CURRENCY = T.let( :currency, - Orb::Price::UnitWithProration::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::TieredWithProration::CompositePriceFilter::Field::TaggedSymbol ) PRICING_UNIT_ID = T.let( :pricing_unit_id, - Orb::Price::UnitWithProration::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::TieredWithProration::CompositePriceFilter::Field::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::UnitWithProration::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::TieredWithProration::CompositePriceFilter::Field::TaggedSymbol ] ) end @@ -10670,7 +10847,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::UnitWithProration::CompositePriceFilter::Operator + Orb::Price::TieredWithProration::CompositePriceFilter::Operator ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -10678,18 +10855,18 @@ module Orb INCLUDES = T.let( :includes, - Orb::Price::UnitWithProration::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::TieredWithProration::CompositePriceFilter::Operator::TaggedSymbol ) EXCLUDES = T.let( :excludes, - Orb::Price::UnitWithProration::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::TieredWithProration::CompositePriceFilter::Operator::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::UnitWithProration::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::TieredWithProration::CompositePriceFilter::Operator::TaggedSymbol ] ) end @@ -10703,66 +10880,130 @@ module Orb TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::UnitWithProration::PriceType) + T.all(Symbol, Orb::Price::TieredWithProration::PriceType) end OrSymbol = T.type_alias { T.any(Symbol, String) } USAGE_PRICE = T.let( :usage_price, - Orb::Price::UnitWithProration::PriceType::TaggedSymbol + Orb::Price::TieredWithProration::PriceType::TaggedSymbol ) FIXED_PRICE = T.let( :fixed_price, - Orb::Price::UnitWithProration::PriceType::TaggedSymbol + Orb::Price::TieredWithProration::PriceType::TaggedSymbol ) COMPOSITE_PRICE = T.let( :composite_price, - Orb::Price::UnitWithProration::PriceType::TaggedSymbol + Orb::Price::TieredWithProration::PriceType::TaggedSymbol ) sig do override.returns( - T::Array[Orb::Price::UnitWithProration::PriceType::TaggedSymbol] + T::Array[Orb::Price::TieredWithProration::PriceType::TaggedSymbol] ) end def self.values end end - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Price::UnitWithProration::UnitWithProrationConfig, + Orb::Price::TieredWithProration::TieredWithProrationConfig, Orb::Internal::AnyHash ) end - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount + # Tiers for rating based on total usage quantities into the specified tier with + # proration + sig do + returns( + T::Array[ + Orb::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] + ) + end + attr_accessor :tiers - # 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: + # Configuration for tiered_with_proration pricing + sig do + params( + tiers: + T::Array[ + Orb::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 { override.returns({ unit_amount: String }) } + sig do + override.returns( + { + tiers: + T::Array[ + Orb::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] + } + ) + end def to_hash end + + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::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 class LicenseType < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Price::UnitWithProration::LicenseType, + Orb::Price::TieredWithProration::LicenseType, Orb::Internal::AnyHash ) end @@ -10807,10 +11048,10 @@ module Orb end end - class GroupedAllocation < Orb::Internal::Type::BaseModel + class UnitWithProration < Orb::Internal::Type::BaseModel OrHash = T.type_alias do - T.any(Orb::Price::GroupedAllocation, Orb::Internal::AnyHash) + T.any(Orb::Price::UnitWithProration, Orb::Internal::AnyHash) end sig { returns(String) } @@ -10837,17 +11078,17 @@ module Orb attr_writer :billing_cycle_configuration sig do - returns(Orb::Price::GroupedAllocation::BillingMode::TaggedSymbol) + returns(Orb::Price::UnitWithProration::BillingMode::TaggedSymbol) end attr_accessor :billing_mode - sig { returns(Orb::Price::GroupedAllocation::Cadence::TaggedSymbol) } + sig { returns(Orb::Price::UnitWithProration::Cadence::TaggedSymbol) } attr_accessor :cadence sig do returns( T.nilable( - T::Array[Orb::Price::GroupedAllocation::CompositePriceFilter] + T::Array[Orb::Price::UnitWithProration::CompositePriceFilter] ) ) end @@ -10859,7 +11100,7 @@ module Orb sig do returns( T.nilable( - Orb::Price::GroupedAllocation::ConversionRateConfig::Variants + Orb::Price::UnitWithProration::ConversionRateConfig::Variants ) ) end @@ -10888,18 +11129,6 @@ module Orb sig { returns(T.nilable(Float)) } attr_accessor :fixed_price_quantity - # Configuration for grouped_allocation pricing - sig { returns(Orb::Price::GroupedAllocation::GroupedAllocationConfig) } - attr_reader :grouped_allocation_config - - sig do - params( - grouped_allocation_config: - Orb::Price::GroupedAllocation::GroupedAllocationConfig::OrHash - ).void - end - attr_writer :grouped_allocation_config - sig { returns(T.nilable(String)) } attr_accessor :invoice_grouping_key @@ -10957,7 +11186,7 @@ module Orb sig { returns(T.nilable(Integer)) } attr_accessor :plan_phase_order - sig { returns(Orb::Price::GroupedAllocation::PriceType::TaggedSymbol) } + sig { returns(Orb::Price::UnitWithProration::PriceType::TaggedSymbol) } attr_accessor :price_type # The price id this price replaces. This price will take the place of the replaced @@ -10965,6 +11194,18 @@ module Orb sig { returns(T.nilable(String)) } attr_accessor :replaces_price_id + # Configuration for unit_with_proration pricing + sig { returns(Orb::Price::UnitWithProration::UnitWithProrationConfig) } + attr_reader :unit_with_proration_config + + sig do + params( + unit_with_proration_config: + Orb::Price::UnitWithProration::UnitWithProrationConfig::OrHash + ).void + end + attr_writer :unit_with_proration_config + sig { returns(T.nilable(Orb::DimensionalPriceConfiguration)) } attr_reader :dimensional_price_configuration @@ -10979,13 +11220,13 @@ module Orb # The LicenseType resource represents a type of license that can be assigned to # users. License types are used during billing by grouping metrics on the # configured grouping key. - sig { returns(T.nilable(Orb::Price::GroupedAllocation::LicenseType)) } + sig { returns(T.nilable(Orb::Price::UnitWithProration::LicenseType)) } attr_reader :license_type sig do params( license_type: - T.nilable(Orb::Price::GroupedAllocation::LicenseType::OrHash) + T.nilable(Orb::Price::UnitWithProration::LicenseType::OrHash) ).void end attr_writer :license_type @@ -10995,12 +11236,12 @@ module Orb id: String, billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash), billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash, - billing_mode: Orb::Price::GroupedAllocation::BillingMode::OrSymbol, - cadence: Orb::Price::GroupedAllocation::Cadence::OrSymbol, + billing_mode: Orb::Price::UnitWithProration::BillingMode::OrSymbol, + cadence: Orb::Price::UnitWithProration::Cadence::OrSymbol, composite_price_filters: T.nilable( T::Array[ - Orb::Price::GroupedAllocation::CompositePriceFilter::OrHash + Orb::Price::UnitWithProration::CompositePriceFilter::OrHash ] ), conversion_rate: T.nilable(Float), @@ -11025,8 +11266,6 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - grouped_allocation_config: - Orb::Price::GroupedAllocation::GroupedAllocationConfig::OrHash, invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: T.nilable(Orb::BillingCycleConfiguration::OrHash), @@ -11038,12 +11277,14 @@ module Orb minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), - price_type: Orb::Price::GroupedAllocation::PriceType::OrSymbol, + price_type: Orb::Price::UnitWithProration::PriceType::OrSymbol, replaces_price_id: T.nilable(String), + unit_with_proration_config: + Orb::Price::UnitWithProration::UnitWithProrationConfig::OrHash, dimensional_price_configuration: T.nilable(Orb::DimensionalPriceConfiguration::OrHash), license_type: - T.nilable(Orb::Price::GroupedAllocation::LicenseType::OrHash), + T.nilable(Orb::Price::UnitWithProration::LicenseType::OrHash), model_type: Symbol ).returns(T.attached_class) end @@ -11062,8 +11303,6 @@ module Orb discount:, external_price_id:, fixed_price_quantity:, - # Configuration for grouped_allocation pricing - grouped_allocation_config:, invoice_grouping_key:, invoicing_cycle_configuration:, # A minimal representation of an Item containing only the essential identifying @@ -11084,13 +11323,15 @@ module Orb # The price id this price replaces. This price will take the place of the replaced # price in plan version migrations. replaces_price_id:, + # Configuration for unit_with_proration pricing + unit_with_proration_config:, dimensional_price_configuration: nil, # The LicenseType resource represents a type of license that can be assigned to # users. License types are used during billing by grouping metrics on the # configured grouping key. license_type: nil, # The pricing model type - model_type: :grouped_allocation + model_type: :unit_with_proration ) end @@ -11101,16 +11342,16 @@ module Orb billable_metric: T.nilable(Orb::BillableMetricTiny), billing_cycle_configuration: Orb::BillingCycleConfiguration, billing_mode: - Orb::Price::GroupedAllocation::BillingMode::TaggedSymbol, - cadence: Orb::Price::GroupedAllocation::Cadence::TaggedSymbol, + Orb::Price::UnitWithProration::BillingMode::TaggedSymbol, + cadence: Orb::Price::UnitWithProration::Cadence::TaggedSymbol, composite_price_filters: T.nilable( - T::Array[Orb::Price::GroupedAllocation::CompositePriceFilter] + T::Array[Orb::Price::UnitWithProration::CompositePriceFilter] ), conversion_rate: T.nilable(Float), conversion_rate_config: T.nilable( - Orb::Price::GroupedAllocation::ConversionRateConfig::Variants + Orb::Price::UnitWithProration::ConversionRateConfig::Variants ), created_at: Time, credit_allocation: T.nilable(Orb::Allocation), @@ -11118,8 +11359,6 @@ module Orb discount: T.nilable(Orb::Discount::Variants), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - grouped_allocation_config: - Orb::Price::GroupedAllocation::GroupedAllocationConfig, invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: T.nilable(Orb::BillingCycleConfiguration), @@ -11133,12 +11372,14 @@ module Orb name: String, plan_phase_order: T.nilable(Integer), price_type: - Orb::Price::GroupedAllocation::PriceType::TaggedSymbol, + Orb::Price::UnitWithProration::PriceType::TaggedSymbol, replaces_price_id: T.nilable(String), + unit_with_proration_config: + Orb::Price::UnitWithProration::UnitWithProrationConfig, dimensional_price_configuration: T.nilable(Orb::DimensionalPriceConfiguration), license_type: - T.nilable(Orb::Price::GroupedAllocation::LicenseType) + T.nilable(Orb::Price::UnitWithProration::LicenseType) } ) end @@ -11150,24 +11391,24 @@ module Orb TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::GroupedAllocation::BillingMode) + T.all(Symbol, Orb::Price::UnitWithProration::BillingMode) end OrSymbol = T.type_alias { T.any(Symbol, String) } IN_ADVANCE = T.let( :in_advance, - Orb::Price::GroupedAllocation::BillingMode::TaggedSymbol + Orb::Price::UnitWithProration::BillingMode::TaggedSymbol ) IN_ARREAR = T.let( :in_arrear, - Orb::Price::GroupedAllocation::BillingMode::TaggedSymbol + Orb::Price::UnitWithProration::BillingMode::TaggedSymbol ) sig do override.returns( - T::Array[Orb::Price::GroupedAllocation::BillingMode::TaggedSymbol] + T::Array[Orb::Price::UnitWithProration::BillingMode::TaggedSymbol] ) end def self.values @@ -11179,38 +11420,38 @@ module Orb TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::GroupedAllocation::Cadence) + T.all(Symbol, Orb::Price::UnitWithProration::Cadence) end OrSymbol = T.type_alias { T.any(Symbol, String) } ONE_TIME = T.let( :one_time, - Orb::Price::GroupedAllocation::Cadence::TaggedSymbol + Orb::Price::UnitWithProration::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Price::GroupedAllocation::Cadence::TaggedSymbol + Orb::Price::UnitWithProration::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Price::GroupedAllocation::Cadence::TaggedSymbol + Orb::Price::UnitWithProration::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Price::GroupedAllocation::Cadence::TaggedSymbol + Orb::Price::UnitWithProration::Cadence::TaggedSymbol ) ANNUAL = - T.let(:annual, Orb::Price::GroupedAllocation::Cadence::TaggedSymbol) + T.let(:annual, Orb::Price::UnitWithProration::Cadence::TaggedSymbol) CUSTOM = - T.let(:custom, Orb::Price::GroupedAllocation::Cadence::TaggedSymbol) + T.let(:custom, Orb::Price::UnitWithProration::Cadence::TaggedSymbol) sig do override.returns( - T::Array[Orb::Price::GroupedAllocation::Cadence::TaggedSymbol] + T::Array[Orb::Price::UnitWithProration::Cadence::TaggedSymbol] ) end def self.values @@ -11221,7 +11462,7 @@ module Orb OrHash = T.type_alias do T.any( - Orb::Price::GroupedAllocation::CompositePriceFilter, + Orb::Price::UnitWithProration::CompositePriceFilter, Orb::Internal::AnyHash ) end @@ -11229,7 +11470,7 @@ module Orb # The property of the price to filter on. sig do returns( - Orb::Price::GroupedAllocation::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::UnitWithProration::CompositePriceFilter::Field::TaggedSymbol ) end attr_accessor :field @@ -11237,7 +11478,7 @@ module Orb # Should prices that match the filter be included or excluded. sig do returns( - Orb::Price::GroupedAllocation::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::UnitWithProration::CompositePriceFilter::Operator::TaggedSymbol ) end attr_accessor :operator @@ -11249,9 +11490,9 @@ module Orb sig do params( field: - Orb::Price::GroupedAllocation::CompositePriceFilter::Field::OrSymbol, + Orb::Price::UnitWithProration::CompositePriceFilter::Field::OrSymbol, operator: - Orb::Price::GroupedAllocation::CompositePriceFilter::Operator::OrSymbol, + Orb::Price::UnitWithProration::CompositePriceFilter::Operator::OrSymbol, values: T::Array[String] ).returns(T.attached_class) end @@ -11269,9 +11510,9 @@ module Orb override.returns( { field: - Orb::Price::GroupedAllocation::CompositePriceFilter::Field::TaggedSymbol, + Orb::Price::UnitWithProration::CompositePriceFilter::Field::TaggedSymbol, operator: - Orb::Price::GroupedAllocation::CompositePriceFilter::Operator::TaggedSymbol, + Orb::Price::UnitWithProration::CompositePriceFilter::Operator::TaggedSymbol, values: T::Array[String] } ) @@ -11287,7 +11528,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::GroupedAllocation::CompositePriceFilter::Field + Orb::Price::UnitWithProration::CompositePriceFilter::Field ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -11295,33 +11536,33 @@ module Orb PRICE_ID = T.let( :price_id, - Orb::Price::GroupedAllocation::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::UnitWithProration::CompositePriceFilter::Field::TaggedSymbol ) ITEM_ID = T.let( :item_id, - Orb::Price::GroupedAllocation::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::UnitWithProration::CompositePriceFilter::Field::TaggedSymbol ) PRICE_TYPE = T.let( :price_type, - Orb::Price::GroupedAllocation::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::UnitWithProration::CompositePriceFilter::Field::TaggedSymbol ) CURRENCY = T.let( :currency, - Orb::Price::GroupedAllocation::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::UnitWithProration::CompositePriceFilter::Field::TaggedSymbol ) PRICING_UNIT_ID = T.let( :pricing_unit_id, - Orb::Price::GroupedAllocation::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::UnitWithProration::CompositePriceFilter::Field::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::GroupedAllocation::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::UnitWithProration::CompositePriceFilter::Field::TaggedSymbol ] ) end @@ -11337,7 +11578,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::GroupedAllocation::CompositePriceFilter::Operator + Orb::Price::UnitWithProration::CompositePriceFilter::Operator ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -11345,18 +11586,18 @@ module Orb INCLUDES = T.let( :includes, - Orb::Price::GroupedAllocation::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::UnitWithProration::CompositePriceFilter::Operator::TaggedSymbol ) EXCLUDES = T.let( :excludes, - Orb::Price::GroupedAllocation::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::UnitWithProration::CompositePriceFilter::Operator::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::GroupedAllocation::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::UnitWithProration::CompositePriceFilter::Operator::TaggedSymbol ] ) end @@ -11365,97 +11606,71 @@ module Orb end end - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel + module PriceType + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::Price::UnitWithProration::PriceType) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + USAGE_PRICE = + T.let( + :usage_price, + Orb::Price::UnitWithProration::PriceType::TaggedSymbol + ) + FIXED_PRICE = + T.let( + :fixed_price, + Orb::Price::UnitWithProration::PriceType::TaggedSymbol + ) + COMPOSITE_PRICE = + T.let( + :composite_price, + Orb::Price::UnitWithProration::PriceType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[Orb::Price::UnitWithProration::PriceType::TaggedSymbol] + ) + end + def self.values + end + end + + class UnitWithProrationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Price::GroupedAllocation::GroupedAllocationConfig, + Orb::Price::UnitWithProration::UnitWithProrationConfig, 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 + # Rate per unit of usage sig { returns(String) } - attr_accessor :overage_unit_rate + attr_accessor :unit_amount - # Configuration for grouped_allocation pricing - sig do - params( - allocation: String, - grouping_key: String, - overage_unit_rate: String - ).returns(T.attached_class) - end + # Configuration for unit_with_proration pricing + sig { params(unit_amount: String).returns(T.attached_class) } 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: + # Rate per unit of usage + unit_amount: ) end - sig do - override.returns( - { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - ) - end + sig { override.returns({ unit_amount: String }) } def to_hash end end - module PriceType - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, Orb::Price::GroupedAllocation::PriceType) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - USAGE_PRICE = - T.let( - :usage_price, - Orb::Price::GroupedAllocation::PriceType::TaggedSymbol - ) - FIXED_PRICE = - T.let( - :fixed_price, - Orb::Price::GroupedAllocation::PriceType::TaggedSymbol - ) - COMPOSITE_PRICE = - T.let( - :composite_price, - Orb::Price::GroupedAllocation::PriceType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[Orb::Price::GroupedAllocation::PriceType::TaggedSymbol] - ) - end - def self.values - end - end - class LicenseType < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Price::GroupedAllocation::LicenseType, + Orb::Price::UnitWithProration::LicenseType, Orb::Internal::AnyHash ) end @@ -11500,10 +11715,10 @@ module Orb end end - class BulkWithProration < Orb::Internal::Type::BaseModel + class GroupedAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do - T.any(Orb::Price::BulkWithProration, Orb::Internal::AnyHash) + T.any(Orb::Price::GroupedAllocation, Orb::Internal::AnyHash) end sig { returns(String) } @@ -11530,29 +11745,17 @@ module Orb attr_writer :billing_cycle_configuration sig do - returns(Orb::Price::BulkWithProration::BillingMode::TaggedSymbol) + returns(Orb::Price::GroupedAllocation::BillingMode::TaggedSymbol) end attr_accessor :billing_mode - # Configuration for bulk_with_proration pricing - sig { returns(Orb::Price::BulkWithProration::BulkWithProrationConfig) } - attr_reader :bulk_with_proration_config - - sig do - params( - bulk_with_proration_config: - Orb::Price::BulkWithProration::BulkWithProrationConfig::OrHash - ).void - end - attr_writer :bulk_with_proration_config - - sig { returns(Orb::Price::BulkWithProration::Cadence::TaggedSymbol) } + sig { returns(Orb::Price::GroupedAllocation::Cadence::TaggedSymbol) } attr_accessor :cadence sig do returns( T.nilable( - T::Array[Orb::Price::BulkWithProration::CompositePriceFilter] + T::Array[Orb::Price::GroupedAllocation::CompositePriceFilter] ) ) end @@ -11564,7 +11767,7 @@ module Orb sig do returns( T.nilable( - Orb::Price::BulkWithProration::ConversionRateConfig::Variants + Orb::Price::GroupedAllocation::ConversionRateConfig::Variants ) ) end @@ -11593,6 +11796,18 @@ module Orb sig { returns(T.nilable(Float)) } attr_accessor :fixed_price_quantity + # Configuration for grouped_allocation pricing + sig { returns(Orb::Price::GroupedAllocation::GroupedAllocationConfig) } + attr_reader :grouped_allocation_config + + sig do + params( + grouped_allocation_config: + Orb::Price::GroupedAllocation::GroupedAllocationConfig::OrHash + ).void + end + attr_writer :grouped_allocation_config + sig { returns(T.nilable(String)) } attr_accessor :invoice_grouping_key @@ -11650,7 +11865,7 @@ module Orb sig { returns(T.nilable(Integer)) } attr_accessor :plan_phase_order - sig { returns(Orb::Price::BulkWithProration::PriceType::TaggedSymbol) } + sig { returns(Orb::Price::GroupedAllocation::PriceType::TaggedSymbol) } attr_accessor :price_type # The price id this price replaces. This price will take the place of the replaced @@ -11672,13 +11887,13 @@ module Orb # The LicenseType resource represents a type of license that can be assigned to # users. License types are used during billing by grouping metrics on the # configured grouping key. - sig { returns(T.nilable(Orb::Price::BulkWithProration::LicenseType)) } + sig { returns(T.nilable(Orb::Price::GroupedAllocation::LicenseType)) } attr_reader :license_type sig do params( license_type: - T.nilable(Orb::Price::BulkWithProration::LicenseType::OrHash) + T.nilable(Orb::Price::GroupedAllocation::LicenseType::OrHash) ).void end attr_writer :license_type @@ -11688,14 +11903,12 @@ module Orb id: String, billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash), billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash, - billing_mode: Orb::Price::BulkWithProration::BillingMode::OrSymbol, - bulk_with_proration_config: - Orb::Price::BulkWithProration::BulkWithProrationConfig::OrHash, - cadence: Orb::Price::BulkWithProration::Cadence::OrSymbol, + billing_mode: Orb::Price::GroupedAllocation::BillingMode::OrSymbol, + cadence: Orb::Price::GroupedAllocation::Cadence::OrSymbol, composite_price_filters: T.nilable( T::Array[ - Orb::Price::BulkWithProration::CompositePriceFilter::OrHash + Orb::Price::GroupedAllocation::CompositePriceFilter::OrHash ] ), conversion_rate: T.nilable(Float), @@ -11720,6 +11933,8 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), + grouped_allocation_config: + Orb::Price::GroupedAllocation::GroupedAllocationConfig::OrHash, invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: T.nilable(Orb::BillingCycleConfiguration::OrHash), @@ -11731,12 +11946,12 @@ module Orb minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), - price_type: Orb::Price::BulkWithProration::PriceType::OrSymbol, + price_type: Orb::Price::GroupedAllocation::PriceType::OrSymbol, replaces_price_id: T.nilable(String), dimensional_price_configuration: T.nilable(Orb::DimensionalPriceConfiguration::OrHash), license_type: - T.nilable(Orb::Price::BulkWithProration::LicenseType::OrHash), + T.nilable(Orb::Price::GroupedAllocation::LicenseType::OrHash), model_type: Symbol ).returns(T.attached_class) end @@ -11745,8 +11960,6 @@ module Orb billable_metric:, billing_cycle_configuration:, billing_mode:, - # Configuration for bulk_with_proration pricing - bulk_with_proration_config:, cadence:, composite_price_filters:, conversion_rate:, @@ -11757,6 +11970,8 @@ module Orb discount:, external_price_id:, fixed_price_quantity:, + # Configuration for grouped_allocation pricing + grouped_allocation_config:, invoice_grouping_key:, invoicing_cycle_configuration:, # A minimal representation of an Item containing only the essential identifying @@ -11783,7 +11998,7 @@ module Orb # configured grouping key. license_type: nil, # The pricing model type - model_type: :bulk_with_proration + model_type: :grouped_allocation ) end @@ -11794,18 +12009,16 @@ module Orb billable_metric: T.nilable(Orb::BillableMetricTiny), billing_cycle_configuration: Orb::BillingCycleConfiguration, billing_mode: - Orb::Price::BulkWithProration::BillingMode::TaggedSymbol, - bulk_with_proration_config: - Orb::Price::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Price::BulkWithProration::Cadence::TaggedSymbol, + Orb::Price::GroupedAllocation::BillingMode::TaggedSymbol, + cadence: Orb::Price::GroupedAllocation::Cadence::TaggedSymbol, composite_price_filters: T.nilable( - T::Array[Orb::Price::BulkWithProration::CompositePriceFilter] + T::Array[Orb::Price::GroupedAllocation::CompositePriceFilter] ), conversion_rate: T.nilable(Float), conversion_rate_config: T.nilable( - Orb::Price::BulkWithProration::ConversionRateConfig::Variants + Orb::Price::GroupedAllocation::ConversionRateConfig::Variants ), created_at: Time, credit_allocation: T.nilable(Orb::Allocation), @@ -11813,6 +12026,8 @@ module Orb discount: T.nilable(Orb::Discount::Variants), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), + grouped_allocation_config: + Orb::Price::GroupedAllocation::GroupedAllocationConfig, invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: T.nilable(Orb::BillingCycleConfiguration), @@ -11826,12 +12041,12 @@ module Orb name: String, plan_phase_order: T.nilable(Integer), price_type: - Orb::Price::BulkWithProration::PriceType::TaggedSymbol, + Orb::Price::GroupedAllocation::PriceType::TaggedSymbol, replaces_price_id: T.nilable(String), dimensional_price_configuration: T.nilable(Orb::DimensionalPriceConfiguration), license_type: - T.nilable(Orb::Price::BulkWithProration::LicenseType) + T.nilable(Orb::Price::GroupedAllocation::LicenseType) } ) end @@ -11843,156 +12058,67 @@ module Orb TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::BulkWithProration::BillingMode) + T.all(Symbol, Orb::Price::GroupedAllocation::BillingMode) end OrSymbol = T.type_alias { T.any(Symbol, String) } IN_ADVANCE = T.let( :in_advance, - Orb::Price::BulkWithProration::BillingMode::TaggedSymbol + Orb::Price::GroupedAllocation::BillingMode::TaggedSymbol ) IN_ARREAR = T.let( :in_arrear, - Orb::Price::BulkWithProration::BillingMode::TaggedSymbol + Orb::Price::GroupedAllocation::BillingMode::TaggedSymbol ) sig do override.returns( - T::Array[Orb::Price::BulkWithProration::BillingMode::TaggedSymbol] + T::Array[Orb::Price::GroupedAllocation::BillingMode::TaggedSymbol] ) end def self.values end end - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Price::BulkWithProration::BulkWithProrationConfig, - Orb::Internal::AnyHash - ) - end - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::Price::BulkWithProration::BulkWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::Price::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::Price::BulkWithProration::BulkWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Price::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 - module Cadence extend Orb::Internal::Type::Enum TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::BulkWithProration::Cadence) + T.all(Symbol, Orb::Price::GroupedAllocation::Cadence) end OrSymbol = T.type_alias { T.any(Symbol, String) } ONE_TIME = T.let( :one_time, - Orb::Price::BulkWithProration::Cadence::TaggedSymbol + Orb::Price::GroupedAllocation::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Price::BulkWithProration::Cadence::TaggedSymbol + Orb::Price::GroupedAllocation::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Price::BulkWithProration::Cadence::TaggedSymbol + Orb::Price::GroupedAllocation::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Price::BulkWithProration::Cadence::TaggedSymbol + Orb::Price::GroupedAllocation::Cadence::TaggedSymbol ) ANNUAL = - T.let(:annual, Orb::Price::BulkWithProration::Cadence::TaggedSymbol) + T.let(:annual, Orb::Price::GroupedAllocation::Cadence::TaggedSymbol) CUSTOM = - T.let(:custom, Orb::Price::BulkWithProration::Cadence::TaggedSymbol) + T.let(:custom, Orb::Price::GroupedAllocation::Cadence::TaggedSymbol) sig do override.returns( - T::Array[Orb::Price::BulkWithProration::Cadence::TaggedSymbol] + T::Array[Orb::Price::GroupedAllocation::Cadence::TaggedSymbol] ) end def self.values @@ -12003,7 +12129,7 @@ module Orb OrHash = T.type_alias do T.any( - Orb::Price::BulkWithProration::CompositePriceFilter, + Orb::Price::GroupedAllocation::CompositePriceFilter, Orb::Internal::AnyHash ) end @@ -12011,7 +12137,7 @@ module Orb # The property of the price to filter on. sig do returns( - Orb::Price::BulkWithProration::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedAllocation::CompositePriceFilter::Field::TaggedSymbol ) end attr_accessor :field @@ -12019,7 +12145,7 @@ module Orb # Should prices that match the filter be included or excluded. sig do returns( - Orb::Price::BulkWithProration::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::GroupedAllocation::CompositePriceFilter::Operator::TaggedSymbol ) end attr_accessor :operator @@ -12031,9 +12157,9 @@ module Orb sig do params( field: - Orb::Price::BulkWithProration::CompositePriceFilter::Field::OrSymbol, + Orb::Price::GroupedAllocation::CompositePriceFilter::Field::OrSymbol, operator: - Orb::Price::BulkWithProration::CompositePriceFilter::Operator::OrSymbol, + Orb::Price::GroupedAllocation::CompositePriceFilter::Operator::OrSymbol, values: T::Array[String] ).returns(T.attached_class) end @@ -12051,9 +12177,9 @@ module Orb override.returns( { field: - Orb::Price::BulkWithProration::CompositePriceFilter::Field::TaggedSymbol, + Orb::Price::GroupedAllocation::CompositePriceFilter::Field::TaggedSymbol, operator: - Orb::Price::BulkWithProration::CompositePriceFilter::Operator::TaggedSymbol, + Orb::Price::GroupedAllocation::CompositePriceFilter::Operator::TaggedSymbol, values: T::Array[String] } ) @@ -12069,7 +12195,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::BulkWithProration::CompositePriceFilter::Field + Orb::Price::GroupedAllocation::CompositePriceFilter::Field ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -12077,33 +12203,33 @@ module Orb PRICE_ID = T.let( :price_id, - Orb::Price::BulkWithProration::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedAllocation::CompositePriceFilter::Field::TaggedSymbol ) ITEM_ID = T.let( :item_id, - Orb::Price::BulkWithProration::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedAllocation::CompositePriceFilter::Field::TaggedSymbol ) PRICE_TYPE = T.let( :price_type, - Orb::Price::BulkWithProration::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedAllocation::CompositePriceFilter::Field::TaggedSymbol ) CURRENCY = T.let( :currency, - Orb::Price::BulkWithProration::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedAllocation::CompositePriceFilter::Field::TaggedSymbol ) PRICING_UNIT_ID = T.let( :pricing_unit_id, - Orb::Price::BulkWithProration::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedAllocation::CompositePriceFilter::Field::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::BulkWithProration::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedAllocation::CompositePriceFilter::Field::TaggedSymbol ] ) end @@ -12119,7 +12245,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::BulkWithProration::CompositePriceFilter::Operator + Orb::Price::GroupedAllocation::CompositePriceFilter::Operator ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -12127,18 +12253,18 @@ module Orb INCLUDES = T.let( :includes, - Orb::Price::BulkWithProration::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::GroupedAllocation::CompositePriceFilter::Operator::TaggedSymbol ) EXCLUDES = T.let( :excludes, - Orb::Price::BulkWithProration::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::GroupedAllocation::CompositePriceFilter::Operator::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::BulkWithProration::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::GroupedAllocation::CompositePriceFilter::Operator::TaggedSymbol ] ) end @@ -12147,34 +12273,86 @@ module Orb end end + class GroupedAllocationConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::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 + module PriceType extend Orb::Internal::Type::Enum TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::BulkWithProration::PriceType) + T.all(Symbol, Orb::Price::GroupedAllocation::PriceType) end OrSymbol = T.type_alias { T.any(Symbol, String) } USAGE_PRICE = T.let( :usage_price, - Orb::Price::BulkWithProration::PriceType::TaggedSymbol + Orb::Price::GroupedAllocation::PriceType::TaggedSymbol ) FIXED_PRICE = T.let( :fixed_price, - Orb::Price::BulkWithProration::PriceType::TaggedSymbol + Orb::Price::GroupedAllocation::PriceType::TaggedSymbol ) COMPOSITE_PRICE = T.let( :composite_price, - Orb::Price::BulkWithProration::PriceType::TaggedSymbol + Orb::Price::GroupedAllocation::PriceType::TaggedSymbol ) sig do override.returns( - T::Array[Orb::Price::BulkWithProration::PriceType::TaggedSymbol] + T::Array[Orb::Price::GroupedAllocation::PriceType::TaggedSymbol] ) end def self.values @@ -12185,7 +12363,7 @@ module Orb OrHash = T.type_alias do T.any( - Orb::Price::BulkWithProration::LicenseType, + Orb::Price::GroupedAllocation::LicenseType, Orb::Internal::AnyHash ) end @@ -12230,13 +12408,10 @@ module Orb end end - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel + class BulkWithProration < Orb::Internal::Type::BaseModel OrHash = T.type_alias do - T.any( - Orb::Price::GroupedWithProratedMinimum, - Orb::Internal::AnyHash - ) + T.any(Orb::Price::BulkWithProration, Orb::Internal::AnyHash) end sig { returns(String) } @@ -12263,23 +12438,29 @@ module Orb attr_writer :billing_cycle_configuration sig do - returns( - Orb::Price::GroupedWithProratedMinimum::BillingMode::TaggedSymbol - ) + returns(Orb::Price::BulkWithProration::BillingMode::TaggedSymbol) end attr_accessor :billing_mode + # Configuration for bulk_with_proration pricing + sig { returns(Orb::Price::BulkWithProration::BulkWithProrationConfig) } + attr_reader :bulk_with_proration_config + sig do - returns(Orb::Price::GroupedWithProratedMinimum::Cadence::TaggedSymbol) + params( + bulk_with_proration_config: + Orb::Price::BulkWithProration::BulkWithProrationConfig::OrHash + ).void end + attr_writer :bulk_with_proration_config + + sig { returns(Orb::Price::BulkWithProration::Cadence::TaggedSymbol) } attr_accessor :cadence sig do returns( T.nilable( - T::Array[ - Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter - ] + T::Array[Orb::Price::BulkWithProration::CompositePriceFilter] ) ) end @@ -12291,7 +12472,7 @@ module Orb sig do returns( T.nilable( - Orb::Price::GroupedWithProratedMinimum::ConversionRateConfig::Variants + Orb::Price::BulkWithProration::ConversionRateConfig::Variants ) ) end @@ -12320,22 +12501,6 @@ module Orb sig { returns(T.nilable(Float)) } attr_accessor :fixed_price_quantity - # Configuration for grouped_with_prorated_minimum pricing - sig do - returns( - Orb::Price::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig - ) - end - attr_reader :grouped_with_prorated_minimum_config - - sig do - params( - grouped_with_prorated_minimum_config: - Orb::Price::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_prorated_minimum_config - sig { returns(T.nilable(String)) } attr_accessor :invoice_grouping_key @@ -12393,11 +12558,7 @@ module Orb sig { returns(T.nilable(Integer)) } attr_accessor :plan_phase_order - sig do - returns( - Orb::Price::GroupedWithProratedMinimum::PriceType::TaggedSymbol - ) - end + sig { returns(Orb::Price::BulkWithProration::PriceType::TaggedSymbol) } attr_accessor :price_type # The price id this price replaces. This price will take the place of the replaced @@ -12419,19 +12580,13 @@ module Orb # The LicenseType resource represents a type of license that can be assigned to # users. License types are used during billing by grouping metrics on the # configured grouping key. - sig do - returns( - T.nilable(Orb::Price::GroupedWithProratedMinimum::LicenseType) - ) - end + sig { returns(T.nilable(Orb::Price::BulkWithProration::LicenseType)) } attr_reader :license_type sig do params( license_type: - T.nilable( - Orb::Price::GroupedWithProratedMinimum::LicenseType::OrHash - ) + T.nilable(Orb::Price::BulkWithProration::LicenseType::OrHash) ).void end attr_writer :license_type @@ -12441,13 +12596,14 @@ module Orb id: String, billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash), billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash, - billing_mode: - Orb::Price::GroupedWithProratedMinimum::BillingMode::OrSymbol, - cadence: Orb::Price::GroupedWithProratedMinimum::Cadence::OrSymbol, + billing_mode: Orb::Price::BulkWithProration::BillingMode::OrSymbol, + bulk_with_proration_config: + Orb::Price::BulkWithProration::BulkWithProrationConfig::OrHash, + cadence: Orb::Price::BulkWithProration::Cadence::OrSymbol, composite_price_filters: T.nilable( T::Array[ - Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::OrHash + Orb::Price::BulkWithProration::CompositePriceFilter::OrHash ] ), conversion_rate: T.nilable(Float), @@ -12472,8 +12628,6 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - grouped_with_prorated_minimum_config: - Orb::Price::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash, invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: T.nilable(Orb::BillingCycleConfiguration::OrHash), @@ -12485,15 +12639,12 @@ module Orb minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), - price_type: - Orb::Price::GroupedWithProratedMinimum::PriceType::OrSymbol, + price_type: Orb::Price::BulkWithProration::PriceType::OrSymbol, replaces_price_id: T.nilable(String), dimensional_price_configuration: T.nilable(Orb::DimensionalPriceConfiguration::OrHash), license_type: - T.nilable( - Orb::Price::GroupedWithProratedMinimum::LicenseType::OrHash - ), + T.nilable(Orb::Price::BulkWithProration::LicenseType::OrHash), model_type: Symbol ).returns(T.attached_class) end @@ -12502,6 +12653,8 @@ module Orb billable_metric:, billing_cycle_configuration:, billing_mode:, + # Configuration for bulk_with_proration pricing + bulk_with_proration_config:, cadence:, composite_price_filters:, conversion_rate:, @@ -12512,8 +12665,6 @@ module Orb discount:, external_price_id:, fixed_price_quantity:, - # Configuration for grouped_with_prorated_minimum pricing - grouped_with_prorated_minimum_config:, invoice_grouping_key:, invoicing_cycle_configuration:, # A minimal representation of an Item containing only the essential identifying @@ -12540,7 +12691,7 @@ module Orb # configured grouping key. license_type: nil, # The pricing model type - model_type: :grouped_with_prorated_minimum + model_type: :bulk_with_proration ) end @@ -12551,19 +12702,18 @@ module Orb billable_metric: T.nilable(Orb::BillableMetricTiny), billing_cycle_configuration: Orb::BillingCycleConfiguration, billing_mode: - Orb::Price::GroupedWithProratedMinimum::BillingMode::TaggedSymbol, - cadence: - Orb::Price::GroupedWithProratedMinimum::Cadence::TaggedSymbol, + Orb::Price::BulkWithProration::BillingMode::TaggedSymbol, + bulk_with_proration_config: + Orb::Price::BulkWithProration::BulkWithProrationConfig, + cadence: Orb::Price::BulkWithProration::Cadence::TaggedSymbol, composite_price_filters: T.nilable( - T::Array[ - Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter - ] + T::Array[Orb::Price::BulkWithProration::CompositePriceFilter] ), conversion_rate: T.nilable(Float), conversion_rate_config: T.nilable( - Orb::Price::GroupedWithProratedMinimum::ConversionRateConfig::Variants + Orb::Price::BulkWithProration::ConversionRateConfig::Variants ), created_at: Time, credit_allocation: T.nilable(Orb::Allocation), @@ -12571,8 +12721,6 @@ module Orb discount: T.nilable(Orb::Discount::Variants), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - grouped_with_prorated_minimum_config: - Orb::Price::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: T.nilable(Orb::BillingCycleConfiguration), @@ -12586,12 +12734,12 @@ module Orb name: String, plan_phase_order: T.nilable(Integer), price_type: - Orb::Price::GroupedWithProratedMinimum::PriceType::TaggedSymbol, + Orb::Price::BulkWithProration::PriceType::TaggedSymbol, replaces_price_id: T.nilable(String), dimensional_price_configuration: T.nilable(Orb::DimensionalPriceConfiguration), license_type: - T.nilable(Orb::Price::GroupedWithProratedMinimum::LicenseType) + T.nilable(Orb::Price::BulkWithProration::LicenseType) } ) end @@ -12603,77 +12751,156 @@ module Orb TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::GroupedWithProratedMinimum::BillingMode) + T.all(Symbol, Orb::Price::BulkWithProration::BillingMode) end OrSymbol = T.type_alias { T.any(Symbol, String) } IN_ADVANCE = T.let( :in_advance, - Orb::Price::GroupedWithProratedMinimum::BillingMode::TaggedSymbol + Orb::Price::BulkWithProration::BillingMode::TaggedSymbol ) IN_ARREAR = T.let( :in_arrear, - Orb::Price::GroupedWithProratedMinimum::BillingMode::TaggedSymbol + Orb::Price::BulkWithProration::BillingMode::TaggedSymbol ) sig do override.returns( - T::Array[ - Orb::Price::GroupedWithProratedMinimum::BillingMode::TaggedSymbol - ] + T::Array[Orb::Price::BulkWithProration::BillingMode::TaggedSymbol] ) end def self.values end end - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = + class BulkWithProrationConfig < Orb::Internal::Type::BaseModel + OrHash = T.type_alias do - T.all(Symbol, Orb::Price::GroupedWithProratedMinimum::Cadence) + T.any( + Orb::Price::BulkWithProration::BulkWithProrationConfig, + Orb::Internal::AnyHash + ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - ONE_TIME = - T.let( - :one_time, - Orb::Price::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - MONTHLY = - T.let( - :monthly, - Orb::Price::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - QUARTERLY = - T.let( - :quarterly, - Orb::Price::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - SEMI_ANNUAL = - T.let( - :semi_annual, - Orb::Price::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ) - ANNUAL = - T.let( - :annual, - Orb::Price::GroupedWithProratedMinimum::Cadence::TaggedSymbol + # Bulk tiers for rating based on total usage volume + sig do + returns( + T::Array[ + Orb::Price::BulkWithProration::BulkWithProrationConfig::Tier + ] ) - CUSTOM = + end + attr_accessor :tiers + + # Configuration for bulk_with_proration pricing + sig do + params( + tiers: + T::Array[ + Orb::Price::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::Price::BulkWithProration::BulkWithProrationConfig::Tier + ] + } + ) + end + def to_hash + end + + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::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 + + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::Price::BulkWithProration::Cadence) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ONE_TIME = T.let( - :custom, - Orb::Price::GroupedWithProratedMinimum::Cadence::TaggedSymbol + :one_time, + Orb::Price::BulkWithProration::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::Price::BulkWithProration::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::Price::BulkWithProration::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Price::BulkWithProration::Cadence::TaggedSymbol ) + ANNUAL = + T.let(:annual, Orb::Price::BulkWithProration::Cadence::TaggedSymbol) + CUSTOM = + T.let(:custom, Orb::Price::BulkWithProration::Cadence::TaggedSymbol) sig do override.returns( - T::Array[ - Orb::Price::GroupedWithProratedMinimum::Cadence::TaggedSymbol - ] + T::Array[Orb::Price::BulkWithProration::Cadence::TaggedSymbol] ) end def self.values @@ -12684,7 +12911,7 @@ module Orb OrHash = T.type_alias do T.any( - Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter, + Orb::Price::BulkWithProration::CompositePriceFilter, Orb::Internal::AnyHash ) end @@ -12692,7 +12919,7 @@ module Orb # The property of the price to filter on. sig do returns( - Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::BulkWithProration::CompositePriceFilter::Field::TaggedSymbol ) end attr_accessor :field @@ -12700,7 +12927,7 @@ module Orb # Should prices that match the filter be included or excluded. sig do returns( - Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::BulkWithProration::CompositePriceFilter::Operator::TaggedSymbol ) end attr_accessor :operator @@ -12712,9 +12939,9 @@ module Orb sig do params( field: - Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Field::OrSymbol, + Orb::Price::BulkWithProration::CompositePriceFilter::Field::OrSymbol, operator: - Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Operator::OrSymbol, + Orb::Price::BulkWithProration::CompositePriceFilter::Operator::OrSymbol, values: T::Array[String] ).returns(T.attached_class) end @@ -12732,9 +12959,9 @@ module Orb override.returns( { field: - Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Field::TaggedSymbol, + Orb::Price::BulkWithProration::CompositePriceFilter::Field::TaggedSymbol, operator: - Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Operator::TaggedSymbol, + Orb::Price::BulkWithProration::CompositePriceFilter::Operator::TaggedSymbol, values: T::Array[String] } ) @@ -12750,7 +12977,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Field + Orb::Price::BulkWithProration::CompositePriceFilter::Field ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -12758,33 +12985,33 @@ module Orb PRICE_ID = T.let( :price_id, - Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::BulkWithProration::CompositePriceFilter::Field::TaggedSymbol ) ITEM_ID = T.let( :item_id, - Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::BulkWithProration::CompositePriceFilter::Field::TaggedSymbol ) PRICE_TYPE = T.let( :price_type, - Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::BulkWithProration::CompositePriceFilter::Field::TaggedSymbol ) CURRENCY = T.let( :currency, - Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::BulkWithProration::CompositePriceFilter::Field::TaggedSymbol ) PRICING_UNIT_ID = T.let( :pricing_unit_id, - Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::BulkWithProration::CompositePriceFilter::Field::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::BulkWithProration::CompositePriceFilter::Field::TaggedSymbol ] ) end @@ -12800,7 +13027,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Operator + Orb::Price::BulkWithProration::CompositePriceFilter::Operator ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -12808,18 +13035,18 @@ module Orb INCLUDES = T.let( :includes, - Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::BulkWithProration::CompositePriceFilter::Operator::TaggedSymbol ) EXCLUDES = T.let( :excludes, - Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::BulkWithProration::CompositePriceFilter::Operator::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::BulkWithProration::CompositePriceFilter::Operator::TaggedSymbol ] ) end @@ -12828,84 +13055,34 @@ module Orb end end - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Price::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 - module PriceType extend Orb::Internal::Type::Enum TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::GroupedWithProratedMinimum::PriceType) + T.all(Symbol, Orb::Price::BulkWithProration::PriceType) end OrSymbol = T.type_alias { T.any(Symbol, String) } USAGE_PRICE = T.let( :usage_price, - Orb::Price::GroupedWithProratedMinimum::PriceType::TaggedSymbol + Orb::Price::BulkWithProration::PriceType::TaggedSymbol ) FIXED_PRICE = T.let( :fixed_price, - Orb::Price::GroupedWithProratedMinimum::PriceType::TaggedSymbol + Orb::Price::BulkWithProration::PriceType::TaggedSymbol ) COMPOSITE_PRICE = T.let( :composite_price, - Orb::Price::GroupedWithProratedMinimum::PriceType::TaggedSymbol + Orb::Price::BulkWithProration::PriceType::TaggedSymbol ) sig do override.returns( - T::Array[ - Orb::Price::GroupedWithProratedMinimum::PriceType::TaggedSymbol - ] + T::Array[Orb::Price::BulkWithProration::PriceType::TaggedSymbol] ) end def self.values @@ -12916,7 +13093,7 @@ module Orb OrHash = T.type_alias do T.any( - Orb::Price::GroupedWithProratedMinimum::LicenseType, + Orb::Price::BulkWithProration::LicenseType, Orb::Internal::AnyHash ) end @@ -12961,10 +13138,13 @@ module Orb end end - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel + class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel OrHash = T.type_alias do - T.any(Orb::Price::GroupedWithMeteredMinimum, Orb::Internal::AnyHash) + T.any( + Orb::Price::GroupedWithProratedMinimum, + Orb::Internal::AnyHash + ) end sig { returns(String) } @@ -12992,13 +13172,13 @@ module Orb sig do returns( - Orb::Price::GroupedWithMeteredMinimum::BillingMode::TaggedSymbol + Orb::Price::GroupedWithProratedMinimum::BillingMode::TaggedSymbol ) end attr_accessor :billing_mode sig do - returns(Orb::Price::GroupedWithMeteredMinimum::Cadence::TaggedSymbol) + returns(Orb::Price::GroupedWithProratedMinimum::Cadence::TaggedSymbol) end attr_accessor :cadence @@ -13006,7 +13186,7 @@ module Orb returns( T.nilable( T::Array[ - Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter + Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter ] ) ) @@ -13019,7 +13199,7 @@ module Orb sig do returns( T.nilable( - Orb::Price::GroupedWithMeteredMinimum::ConversionRateConfig::Variants + Orb::Price::GroupedWithProratedMinimum::ConversionRateConfig::Variants ) ) end @@ -13048,21 +13228,21 @@ module Orb sig { returns(T.nilable(Float)) } attr_accessor :fixed_price_quantity - # Configuration for grouped_with_metered_minimum pricing + # Configuration for grouped_with_prorated_minimum pricing sig do returns( - Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig + Orb::Price::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig ) end - attr_reader :grouped_with_metered_minimum_config + attr_reader :grouped_with_prorated_minimum_config sig do params( - grouped_with_metered_minimum_config: - Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash + grouped_with_prorated_minimum_config: + Orb::Price::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash ).void end - attr_writer :grouped_with_metered_minimum_config + attr_writer :grouped_with_prorated_minimum_config sig { returns(T.nilable(String)) } attr_accessor :invoice_grouping_key @@ -13123,7 +13303,7 @@ module Orb sig do returns( - Orb::Price::GroupedWithMeteredMinimum::PriceType::TaggedSymbol + Orb::Price::GroupedWithProratedMinimum::PriceType::TaggedSymbol ) end attr_accessor :price_type @@ -13148,7 +13328,9 @@ module Orb # users. License types are used during billing by grouping metrics on the # configured grouping key. sig do - returns(T.nilable(Orb::Price::GroupedWithMeteredMinimum::LicenseType)) + returns( + T.nilable(Orb::Price::GroupedWithProratedMinimum::LicenseType) + ) end attr_reader :license_type @@ -13156,7 +13338,7 @@ module Orb params( license_type: T.nilable( - Orb::Price::GroupedWithMeteredMinimum::LicenseType::OrHash + Orb::Price::GroupedWithProratedMinimum::LicenseType::OrHash ) ).void end @@ -13168,12 +13350,12 @@ module Orb billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash), billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash, billing_mode: - Orb::Price::GroupedWithMeteredMinimum::BillingMode::OrSymbol, - cadence: Orb::Price::GroupedWithMeteredMinimum::Cadence::OrSymbol, + Orb::Price::GroupedWithProratedMinimum::BillingMode::OrSymbol, + cadence: Orb::Price::GroupedWithProratedMinimum::Cadence::OrSymbol, composite_price_filters: T.nilable( T::Array[ - Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::OrHash + Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::OrHash ] ), conversion_rate: T.nilable(Float), @@ -13198,8 +13380,8 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - grouped_with_metered_minimum_config: - Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash, + grouped_with_prorated_minimum_config: + Orb::Price::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig::OrHash, invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: T.nilable(Orb::BillingCycleConfiguration::OrHash), @@ -13212,13 +13394,13 @@ module Orb name: String, plan_phase_order: T.nilable(Integer), price_type: - Orb::Price::GroupedWithMeteredMinimum::PriceType::OrSymbol, + Orb::Price::GroupedWithProratedMinimum::PriceType::OrSymbol, replaces_price_id: T.nilable(String), dimensional_price_configuration: T.nilable(Orb::DimensionalPriceConfiguration::OrHash), license_type: T.nilable( - Orb::Price::GroupedWithMeteredMinimum::LicenseType::OrHash + Orb::Price::GroupedWithProratedMinimum::LicenseType::OrHash ), model_type: Symbol ).returns(T.attached_class) @@ -13238,8 +13420,8 @@ module Orb discount:, external_price_id:, fixed_price_quantity:, - # Configuration for grouped_with_metered_minimum pricing - grouped_with_metered_minimum_config:, + # Configuration for grouped_with_prorated_minimum pricing + grouped_with_prorated_minimum_config:, invoice_grouping_key:, invoicing_cycle_configuration:, # A minimal representation of an Item containing only the essential identifying @@ -13266,7 +13448,7 @@ module Orb # configured grouping key. license_type: nil, # The pricing model type - model_type: :grouped_with_metered_minimum + model_type: :grouped_with_prorated_minimum ) end @@ -13277,19 +13459,19 @@ module Orb billable_metric: T.nilable(Orb::BillableMetricTiny), billing_cycle_configuration: Orb::BillingCycleConfiguration, billing_mode: - Orb::Price::GroupedWithMeteredMinimum::BillingMode::TaggedSymbol, + Orb::Price::GroupedWithProratedMinimum::BillingMode::TaggedSymbol, cadence: - Orb::Price::GroupedWithMeteredMinimum::Cadence::TaggedSymbol, + Orb::Price::GroupedWithProratedMinimum::Cadence::TaggedSymbol, composite_price_filters: T.nilable( T::Array[ - Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter + Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter ] ), conversion_rate: T.nilable(Float), conversion_rate_config: T.nilable( - Orb::Price::GroupedWithMeteredMinimum::ConversionRateConfig::Variants + Orb::Price::GroupedWithProratedMinimum::ConversionRateConfig::Variants ), created_at: Time, credit_allocation: T.nilable(Orb::Allocation), @@ -13297,8 +13479,8 @@ module Orb discount: T.nilable(Orb::Discount::Variants), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - grouped_with_metered_minimum_config: - Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, + grouped_with_prorated_minimum_config: + Orb::Price::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: T.nilable(Orb::BillingCycleConfiguration), @@ -13312,12 +13494,12 @@ module Orb name: String, plan_phase_order: T.nilable(Integer), price_type: - Orb::Price::GroupedWithMeteredMinimum::PriceType::TaggedSymbol, + Orb::Price::GroupedWithProratedMinimum::PriceType::TaggedSymbol, replaces_price_id: T.nilable(String), dimensional_price_configuration: T.nilable(Orb::DimensionalPriceConfiguration), license_type: - T.nilable(Orb::Price::GroupedWithMeteredMinimum::LicenseType) + T.nilable(Orb::Price::GroupedWithProratedMinimum::LicenseType) } ) end @@ -13329,25 +13511,25 @@ module Orb TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::GroupedWithMeteredMinimum::BillingMode) + T.all(Symbol, Orb::Price::GroupedWithProratedMinimum::BillingMode) end OrSymbol = T.type_alias { T.any(Symbol, String) } IN_ADVANCE = T.let( :in_advance, - Orb::Price::GroupedWithMeteredMinimum::BillingMode::TaggedSymbol + Orb::Price::GroupedWithProratedMinimum::BillingMode::TaggedSymbol ) IN_ARREAR = T.let( :in_arrear, - Orb::Price::GroupedWithMeteredMinimum::BillingMode::TaggedSymbol + Orb::Price::GroupedWithProratedMinimum::BillingMode::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::GroupedWithMeteredMinimum::BillingMode::TaggedSymbol + Orb::Price::GroupedWithProratedMinimum::BillingMode::TaggedSymbol ] ) end @@ -13360,45 +13542,45 @@ module Orb TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::GroupedWithMeteredMinimum::Cadence) + T.all(Symbol, Orb::Price::GroupedWithProratedMinimum::Cadence) end OrSymbol = T.type_alias { T.any(Symbol, String) } ONE_TIME = T.let( :one_time, - Orb::Price::GroupedWithMeteredMinimum::Cadence::TaggedSymbol + Orb::Price::GroupedWithProratedMinimum::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Price::GroupedWithMeteredMinimum::Cadence::TaggedSymbol + Orb::Price::GroupedWithProratedMinimum::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Price::GroupedWithMeteredMinimum::Cadence::TaggedSymbol + Orb::Price::GroupedWithProratedMinimum::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Price::GroupedWithMeteredMinimum::Cadence::TaggedSymbol + Orb::Price::GroupedWithProratedMinimum::Cadence::TaggedSymbol ) ANNUAL = T.let( :annual, - Orb::Price::GroupedWithMeteredMinimum::Cadence::TaggedSymbol + Orb::Price::GroupedWithProratedMinimum::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Price::GroupedWithMeteredMinimum::Cadence::TaggedSymbol + Orb::Price::GroupedWithProratedMinimum::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::GroupedWithMeteredMinimum::Cadence::TaggedSymbol + Orb::Price::GroupedWithProratedMinimum::Cadence::TaggedSymbol ] ) end @@ -13410,7 +13592,7 @@ module Orb OrHash = T.type_alias do T.any( - Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter, + Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter, Orb::Internal::AnyHash ) end @@ -13418,7 +13600,7 @@ module Orb # The property of the price to filter on. sig do returns( - Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Field::TaggedSymbol ) end attr_accessor :field @@ -13426,7 +13608,7 @@ module Orb # Should prices that match the filter be included or excluded. sig do returns( - Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Operator::TaggedSymbol ) end attr_accessor :operator @@ -13438,9 +13620,9 @@ module Orb sig do params( field: - Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Field::OrSymbol, + Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Field::OrSymbol, operator: - Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Operator::OrSymbol, + Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Operator::OrSymbol, values: T::Array[String] ).returns(T.attached_class) end @@ -13458,9 +13640,9 @@ module Orb override.returns( { field: - Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Field::TaggedSymbol, + Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Field::TaggedSymbol, operator: - Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Operator::TaggedSymbol, + Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Operator::TaggedSymbol, values: T::Array[String] } ) @@ -13476,7 +13658,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Field + Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Field ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -13484,33 +13666,33 @@ module Orb PRICE_ID = T.let( :price_id, - Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Field::TaggedSymbol ) ITEM_ID = T.let( :item_id, - Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Field::TaggedSymbol ) PRICE_TYPE = T.let( :price_type, - Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Field::TaggedSymbol ) CURRENCY = T.let( :currency, - Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Field::TaggedSymbol ) PRICING_UNIT_ID = T.let( :pricing_unit_id, - Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Field::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Field::TaggedSymbol ] ) end @@ -13526,7 +13708,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Operator + Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Operator ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -13534,18 +13716,18 @@ module Orb INCLUDES = T.let( :includes, - Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Operator::TaggedSymbol ) EXCLUDES = T.let( :excludes, - Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Operator::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter::Operator::TaggedSymbol ] ) end @@ -13554,177 +13736,52 @@ module Orb end end - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel + class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, + Orb::Price::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, Orb::Internal::AnyHash ) end - # Used to partition the usage into groups. The minimum amount is applied to each - # group. + # 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 per unit - sig { returns(String) } - attr_accessor :minimum_unit_amount - - # Used to determine the unit rate + # The minimum amount to charge per group sig { returns(String) } - attr_accessor :pricing_key - - # Scale the unit rates by the scaling factor. - sig do - returns( - T::Array[ - Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ] - ) - end - attr_accessor :scaling_factors + attr_accessor :minimum - # Used to determine the unit rate scaling factor + # The amount to charge per unit 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::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts + attr_accessor :unit_rate - # Configuration for grouped_with_metered_minimum pricing + # Configuration for grouped_with_prorated_minimum pricing sig do params( grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor::OrHash - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount::OrHash - ] + minimum: String, + unit_rate: String ).returns(T.attached_class) end def self.new( - # Used to partition the usage into groups. The minimum amount is applied to each - # group. + # How to determine the groups that should each have a minimum 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: + # 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_unit_amount: String, - pricing_key: String, - scaling_factors: - T::Array[ - Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount - ] - } + { grouping_key: String, minimum: String, unit_rate: String } ) end def to_hash end - - class ScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Price::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::Price::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 module PriceType @@ -13732,30 +13789,30 @@ module Orb TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::GroupedWithMeteredMinimum::PriceType) + T.all(Symbol, Orb::Price::GroupedWithProratedMinimum::PriceType) end OrSymbol = T.type_alias { T.any(Symbol, String) } USAGE_PRICE = T.let( :usage_price, - Orb::Price::GroupedWithMeteredMinimum::PriceType::TaggedSymbol + Orb::Price::GroupedWithProratedMinimum::PriceType::TaggedSymbol ) FIXED_PRICE = T.let( :fixed_price, - Orb::Price::GroupedWithMeteredMinimum::PriceType::TaggedSymbol + Orb::Price::GroupedWithProratedMinimum::PriceType::TaggedSymbol ) COMPOSITE_PRICE = T.let( :composite_price, - Orb::Price::GroupedWithMeteredMinimum::PriceType::TaggedSymbol + Orb::Price::GroupedWithProratedMinimum::PriceType::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::GroupedWithMeteredMinimum::PriceType::TaggedSymbol + Orb::Price::GroupedWithProratedMinimum::PriceType::TaggedSymbol ] ) end @@ -13767,7 +13824,7 @@ module Orb OrHash = T.type_alias do T.any( - Orb::Price::GroupedWithMeteredMinimum::LicenseType, + Orb::Price::GroupedWithProratedMinimum::LicenseType, Orb::Internal::AnyHash ) end @@ -13812,13 +13869,10 @@ module Orb end end - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel OrHash = T.type_alias do - T.any( - Orb::Price::GroupedWithMinMaxThresholds, - Orb::Internal::AnyHash - ) + T.any(Orb::Price::GroupedWithMeteredMinimum, Orb::Internal::AnyHash) end sig { returns(String) } @@ -13846,15 +13900,13 @@ module Orb sig do returns( - Orb::Price::GroupedWithMinMaxThresholds::BillingMode::TaggedSymbol + Orb::Price::GroupedWithMeteredMinimum::BillingMode::TaggedSymbol ) end attr_accessor :billing_mode sig do - returns( - Orb::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol - ) + returns(Orb::Price::GroupedWithMeteredMinimum::Cadence::TaggedSymbol) end attr_accessor :cadence @@ -13862,7 +13914,7 @@ module Orb returns( T.nilable( T::Array[ - Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter + Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter ] ) ) @@ -13875,7 +13927,7 @@ module Orb sig do returns( T.nilable( - Orb::Price::GroupedWithMinMaxThresholds::ConversionRateConfig::Variants + Orb::Price::GroupedWithMeteredMinimum::ConversionRateConfig::Variants ) ) end @@ -13904,21 +13956,21 @@ module Orb sig { returns(T.nilable(Float)) } attr_accessor :fixed_price_quantity - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for grouped_with_metered_minimum pricing sig do returns( - Orb::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig ) end - attr_reader :grouped_with_min_max_thresholds_config + attr_reader :grouped_with_metered_minimum_config sig do params( - grouped_with_min_max_thresholds_config: - Orb::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + grouped_with_metered_minimum_config: + Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash ).void end - attr_writer :grouped_with_min_max_thresholds_config + attr_writer :grouped_with_metered_minimum_config sig { returns(T.nilable(String)) } attr_accessor :invoice_grouping_key @@ -13979,7 +14031,7 @@ module Orb sig do returns( - Orb::Price::GroupedWithMinMaxThresholds::PriceType::TaggedSymbol + Orb::Price::GroupedWithMeteredMinimum::PriceType::TaggedSymbol ) end attr_accessor :price_type @@ -14004,9 +14056,7 @@ module Orb # users. License types are used during billing by grouping metrics on the # configured grouping key. sig do - returns( - T.nilable(Orb::Price::GroupedWithMinMaxThresholds::LicenseType) - ) + returns(T.nilable(Orb::Price::GroupedWithMeteredMinimum::LicenseType)) end attr_reader :license_type @@ -14014,7 +14064,7 @@ module Orb params( license_type: T.nilable( - Orb::Price::GroupedWithMinMaxThresholds::LicenseType::OrHash + Orb::Price::GroupedWithMeteredMinimum::LicenseType::OrHash ) ).void end @@ -14026,12 +14076,12 @@ module Orb billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash), billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash, billing_mode: - Orb::Price::GroupedWithMinMaxThresholds::BillingMode::OrSymbol, - cadence: Orb::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + Orb::Price::GroupedWithMeteredMinimum::BillingMode::OrSymbol, + cadence: Orb::Price::GroupedWithMeteredMinimum::Cadence::OrSymbol, composite_price_filters: T.nilable( T::Array[ - Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::OrHash + Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::OrHash ] ), conversion_rate: T.nilable(Float), @@ -14056,8 +14106,8 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - grouped_with_min_max_thresholds_config: - Orb::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, + grouped_with_metered_minimum_config: + Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::OrHash, invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: T.nilable(Orb::BillingCycleConfiguration::OrHash), @@ -14070,13 +14120,13 @@ module Orb name: String, plan_phase_order: T.nilable(Integer), price_type: - Orb::Price::GroupedWithMinMaxThresholds::PriceType::OrSymbol, + Orb::Price::GroupedWithMeteredMinimum::PriceType::OrSymbol, replaces_price_id: T.nilable(String), dimensional_price_configuration: T.nilable(Orb::DimensionalPriceConfiguration::OrHash), license_type: T.nilable( - Orb::Price::GroupedWithMinMaxThresholds::LicenseType::OrHash + Orb::Price::GroupedWithMeteredMinimum::LicenseType::OrHash ), model_type: Symbol ).returns(T.attached_class) @@ -14096,8 +14146,8 @@ module Orb discount:, external_price_id:, fixed_price_quantity:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, + # Configuration for grouped_with_metered_minimum pricing + grouped_with_metered_minimum_config:, invoice_grouping_key:, invoicing_cycle_configuration:, # A minimal representation of an Item containing only the essential identifying @@ -14124,7 +14174,7 @@ module Orb # configured grouping key. license_type: nil, # The pricing model type - model_type: :grouped_with_min_max_thresholds + model_type: :grouped_with_metered_minimum ) end @@ -14135,19 +14185,19 @@ module Orb billable_metric: T.nilable(Orb::BillableMetricTiny), billing_cycle_configuration: Orb::BillingCycleConfiguration, billing_mode: - Orb::Price::GroupedWithMinMaxThresholds::BillingMode::TaggedSymbol, + Orb::Price::GroupedWithMeteredMinimum::BillingMode::TaggedSymbol, cadence: - Orb::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol, + Orb::Price::GroupedWithMeteredMinimum::Cadence::TaggedSymbol, composite_price_filters: T.nilable( T::Array[ - Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter + Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter ] ), conversion_rate: T.nilable(Float), conversion_rate_config: T.nilable( - Orb::Price::GroupedWithMinMaxThresholds::ConversionRateConfig::Variants + Orb::Price::GroupedWithMeteredMinimum::ConversionRateConfig::Variants ), created_at: Time, credit_allocation: T.nilable(Orb::Allocation), @@ -14155,8 +14205,8 @@ module Orb discount: T.nilable(Orb::Discount::Variants), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - grouped_with_min_max_thresholds_config: - Orb::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + grouped_with_metered_minimum_config: + Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: T.nilable(Orb::BillingCycleConfiguration), @@ -14170,12 +14220,12 @@ module Orb name: String, plan_phase_order: T.nilable(Integer), price_type: - Orb::Price::GroupedWithMinMaxThresholds::PriceType::TaggedSymbol, + Orb::Price::GroupedWithMeteredMinimum::PriceType::TaggedSymbol, replaces_price_id: T.nilable(String), dimensional_price_configuration: T.nilable(Orb::DimensionalPriceConfiguration), license_type: - T.nilable(Orb::Price::GroupedWithMinMaxThresholds::LicenseType) + T.nilable(Orb::Price::GroupedWithMeteredMinimum::LicenseType) } ) end @@ -14187,28 +14237,25 @@ module Orb TaggedSymbol = T.type_alias do - T.all( - Symbol, - Orb::Price::GroupedWithMinMaxThresholds::BillingMode - ) + T.all(Symbol, Orb::Price::GroupedWithMeteredMinimum::BillingMode) end OrSymbol = T.type_alias { T.any(Symbol, String) } IN_ADVANCE = T.let( :in_advance, - Orb::Price::GroupedWithMinMaxThresholds::BillingMode::TaggedSymbol + Orb::Price::GroupedWithMeteredMinimum::BillingMode::TaggedSymbol ) IN_ARREAR = T.let( :in_arrear, - Orb::Price::GroupedWithMinMaxThresholds::BillingMode::TaggedSymbol + Orb::Price::GroupedWithMeteredMinimum::BillingMode::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::GroupedWithMinMaxThresholds::BillingMode::TaggedSymbol + Orb::Price::GroupedWithMeteredMinimum::BillingMode::TaggedSymbol ] ) end @@ -14221,45 +14268,45 @@ module Orb TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::GroupedWithMinMaxThresholds::Cadence) + T.all(Symbol, Orb::Price::GroupedWithMeteredMinimum::Cadence) end OrSymbol = T.type_alias { T.any(Symbol, String) } ONE_TIME = T.let( :one_time, - Orb::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Price::GroupedWithMeteredMinimum::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Price::GroupedWithMeteredMinimum::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Price::GroupedWithMeteredMinimum::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Price::GroupedWithMeteredMinimum::Cadence::TaggedSymbol ) ANNUAL = T.let( :annual, - Orb::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Price::GroupedWithMeteredMinimum::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Price::GroupedWithMeteredMinimum::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Price::GroupedWithMeteredMinimum::Cadence::TaggedSymbol ] ) end @@ -14271,7 +14318,7 @@ module Orb OrHash = T.type_alias do T.any( - Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter, + Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter, Orb::Internal::AnyHash ) end @@ -14279,7 +14326,7 @@ module Orb # The property of the price to filter on. sig do returns( - Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Field::TaggedSymbol ) end attr_accessor :field @@ -14287,7 +14334,7 @@ module Orb # Should prices that match the filter be included or excluded. sig do returns( - Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Operator::TaggedSymbol ) end attr_accessor :operator @@ -14299,9 +14346,9 @@ module Orb sig do params( field: - Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Field::OrSymbol, + Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Field::OrSymbol, operator: - Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Operator::OrSymbol, + Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Operator::OrSymbol, values: T::Array[String] ).returns(T.attached_class) end @@ -14319,9 +14366,9 @@ module Orb override.returns( { field: - Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Field::TaggedSymbol, + Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Field::TaggedSymbol, operator: - Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Operator::TaggedSymbol, + Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Operator::TaggedSymbol, values: T::Array[String] } ) @@ -14337,7 +14384,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Field + Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Field ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -14345,33 +14392,33 @@ module Orb PRICE_ID = T.let( :price_id, - Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Field::TaggedSymbol ) ITEM_ID = T.let( :item_id, - Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Field::TaggedSymbol ) PRICE_TYPE = T.let( :price_type, - Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Field::TaggedSymbol ) CURRENCY = T.let( :currency, - Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Field::TaggedSymbol ) PRICING_UNIT_ID = T.let( :pricing_unit_id, - Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Field::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Field::TaggedSymbol ] ) end @@ -14387,7 +14434,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Operator + Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Operator ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -14395,18 +14442,18 @@ module Orb INCLUDES = T.let( :includes, - Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Operator::TaggedSymbol ) EXCLUDES = T.let( :excludes, - Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Operator::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter::Operator::TaggedSymbol ] ) end @@ -14415,49 +14462,85 @@ module Orb end end - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, Orb::Internal::AnyHash ) end - # The event property used to group before applying thresholds + # Used to partition the usage into groups. The minimum amount is applied to each + # group. sig { returns(String) } attr_accessor :grouping_key - # The maximum amount to charge each group + # The minimum amount to charge per group per unit sig { returns(String) } - attr_accessor :maximum_charge + attr_accessor :minimum_unit_amount - # The minimum amount to charge each group, regardless of usage + # Used to determine the unit rate sig { returns(String) } - attr_accessor :minimum_charge + attr_accessor :pricing_key - # The base price charged per group + # Scale the unit rates by the scaling factor. + sig do + returns( + T::Array[ + Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor + ] + ) + end + attr_accessor :scaling_factors + + # Used to determine the unit rate scaling factor sig { returns(String) } - attr_accessor :per_unit_rate + attr_accessor :scaling_key - # Configuration for grouped_with_min_max_thresholds pricing + # Apply per unit pricing to each pricing value. The minimum amount is applied any + # unmatched usage. + sig do + returns( + T::Array[ + Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount + ] + ) + end + attr_accessor :unit_amounts + + # Configuration for grouped_with_metered_minimum pricing sig do params( grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + minimum_unit_amount: String, + pricing_key: String, + scaling_factors: + T::Array[ + Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor::OrHash + ], + scaling_key: String, + unit_amounts: + T::Array[ + Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount::OrHash + ] ).returns(T.attached_class) end def self.new( - # The event property used to group before applying thresholds + # Used to partition the usage into groups. The minimum amount is applied to each + # group. 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 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 @@ -14465,45 +14548,122 @@ module Orb override.returns( { grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + minimum_unit_amount: String, + pricing_key: String, + scaling_factors: + T::Array[ + Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor + ], + scaling_key: String, + unit_amounts: + T::Array[ + Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount + ] } ) end def to_hash end - end - module PriceType - extend Orb::Internal::Type::Enum + class ScalingFactor < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor, + Orb::Internal::AnyHash + ) + end - TaggedSymbol = - T.type_alias do - T.all(Symbol, Orb::Price::GroupedWithMinMaxThresholds::PriceType) + 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 - OrSymbol = T.type_alias { T.any(Symbol, String) } - USAGE_PRICE = - T.let( - :usage_price, - Orb::Price::GroupedWithMinMaxThresholds::PriceType::TaggedSymbol - ) - FIXED_PRICE = + 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::Price::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 + + module PriceType + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::Price::GroupedWithMeteredMinimum::PriceType) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + USAGE_PRICE = + T.let( + :usage_price, + Orb::Price::GroupedWithMeteredMinimum::PriceType::TaggedSymbol + ) + FIXED_PRICE = T.let( :fixed_price, - Orb::Price::GroupedWithMinMaxThresholds::PriceType::TaggedSymbol + Orb::Price::GroupedWithMeteredMinimum::PriceType::TaggedSymbol ) COMPOSITE_PRICE = T.let( :composite_price, - Orb::Price::GroupedWithMinMaxThresholds::PriceType::TaggedSymbol + Orb::Price::GroupedWithMeteredMinimum::PriceType::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::GroupedWithMinMaxThresholds::PriceType::TaggedSymbol + Orb::Price::GroupedWithMeteredMinimum::PriceType::TaggedSymbol ] ) end @@ -14515,7 +14675,7 @@ module Orb OrHash = T.type_alias do T.any( - Orb::Price::GroupedWithMinMaxThresholds::LicenseType, + Orb::Price::GroupedWithMeteredMinimum::LicenseType, Orb::Internal::AnyHash ) end @@ -14560,10 +14720,13 @@ module Orb end end - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do - T.any(Orb::Price::MatrixWithDisplayName, Orb::Internal::AnyHash) + T.any( + Orb::Price::GroupedWithMinMaxThresholds, + Orb::Internal::AnyHash + ) end sig { returns(String) } @@ -14590,19 +14753,25 @@ module Orb attr_writer :billing_cycle_configuration sig do - returns(Orb::Price::MatrixWithDisplayName::BillingMode::TaggedSymbol) + returns( + Orb::Price::GroupedWithMinMaxThresholds::BillingMode::TaggedSymbol + ) end attr_accessor :billing_mode sig do - returns(Orb::Price::MatrixWithDisplayName::Cadence::TaggedSymbol) + returns( + Orb::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) end attr_accessor :cadence sig do returns( T.nilable( - T::Array[Orb::Price::MatrixWithDisplayName::CompositePriceFilter] + T::Array[ + Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter + ] ) ) end @@ -14614,7 +14783,7 @@ module Orb sig do returns( T.nilable( - Orb::Price::MatrixWithDisplayName::ConversionRateConfig::Variants + Orb::Price::GroupedWithMinMaxThresholds::ConversionRateConfig::Variants ) ) end @@ -14643,6 +14812,22 @@ module Orb sig { returns(T.nilable(Float)) } attr_accessor :fixed_price_quantity + # Configuration for grouped_with_min_max_thresholds pricing + sig do + returns( + Orb::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + ) + end + attr_reader :grouped_with_min_max_thresholds_config + + sig do + params( + grouped_with_min_max_thresholds_config: + Orb::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + ).void + end + attr_writer :grouped_with_min_max_thresholds_config + sig { returns(T.nilable(String)) } attr_accessor :invoice_grouping_key @@ -14665,22 +14850,6 @@ module Orb sig { params(item: Orb::ItemSlim::OrHash).void } attr_writer :item - # Configuration for matrix_with_display_name pricing - sig do - returns( - Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig - ) - end - attr_reader :matrix_with_display_name_config - - sig do - params( - matrix_with_display_name_config: - Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash - ).void - end - attr_writer :matrix_with_display_name_config - sig { returns(T.nilable(Orb::Maximum)) } attr_reader :maximum @@ -14717,7 +14886,9 @@ module Orb attr_accessor :plan_phase_order sig do - returns(Orb::Price::MatrixWithDisplayName::PriceType::TaggedSymbol) + returns( + Orb::Price::GroupedWithMinMaxThresholds::PriceType::TaggedSymbol + ) end attr_accessor :price_type @@ -14741,14 +14912,18 @@ module Orb # users. License types are used during billing by grouping metrics on the # configured grouping key. sig do - returns(T.nilable(Orb::Price::MatrixWithDisplayName::LicenseType)) + returns( + T.nilable(Orb::Price::GroupedWithMinMaxThresholds::LicenseType) + ) end attr_reader :license_type sig do params( license_type: - T.nilable(Orb::Price::MatrixWithDisplayName::LicenseType::OrHash) + T.nilable( + Orb::Price::GroupedWithMinMaxThresholds::LicenseType::OrHash + ) ).void end attr_writer :license_type @@ -14759,12 +14934,12 @@ module Orb billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash), billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash, billing_mode: - Orb::Price::MatrixWithDisplayName::BillingMode::OrSymbol, - cadence: Orb::Price::MatrixWithDisplayName::Cadence::OrSymbol, + Orb::Price::GroupedWithMinMaxThresholds::BillingMode::OrSymbol, + cadence: Orb::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, composite_price_filters: T.nilable( T::Array[ - Orb::Price::MatrixWithDisplayName::CompositePriceFilter::OrHash + Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::OrHash ] ), conversion_rate: T.nilable(Float), @@ -14789,12 +14964,12 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), + grouped_with_min_max_thresholds_config: + Orb::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: T.nilable(Orb::BillingCycleConfiguration::OrHash), item: Orb::ItemSlim::OrHash, - matrix_with_display_name_config: - Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash, maximum: T.nilable(Orb::Maximum::OrHash), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], @@ -14802,12 +14977,15 @@ module Orb minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), - price_type: Orb::Price::MatrixWithDisplayName::PriceType::OrSymbol, + price_type: + Orb::Price::GroupedWithMinMaxThresholds::PriceType::OrSymbol, replaces_price_id: T.nilable(String), dimensional_price_configuration: T.nilable(Orb::DimensionalPriceConfiguration::OrHash), license_type: - T.nilable(Orb::Price::MatrixWithDisplayName::LicenseType::OrHash), + T.nilable( + Orb::Price::GroupedWithMinMaxThresholds::LicenseType::OrHash + ), model_type: Symbol ).returns(T.attached_class) end @@ -14826,13 +15004,13 @@ module Orb discount:, external_price_id:, fixed_price_quantity:, + # Configuration for grouped_with_min_max_thresholds pricing + grouped_with_min_max_thresholds_config:, invoice_grouping_key:, invoicing_cycle_configuration:, # A minimal representation of an Item containing only the essential identifying # information. item:, - # Configuration for matrix_with_display_name pricing - matrix_with_display_name_config:, maximum:, maximum_amount:, # User specified key-value pairs for the resource. If not present, this defaults @@ -14854,7 +15032,7 @@ module Orb # configured grouping key. license_type: nil, # The pricing model type - model_type: :matrix_with_display_name + model_type: :grouped_with_min_max_thresholds ) end @@ -14865,18 +15043,19 @@ module Orb billable_metric: T.nilable(Orb::BillableMetricTiny), billing_cycle_configuration: Orb::BillingCycleConfiguration, billing_mode: - Orb::Price::MatrixWithDisplayName::BillingMode::TaggedSymbol, - cadence: Orb::Price::MatrixWithDisplayName::Cadence::TaggedSymbol, + Orb::Price::GroupedWithMinMaxThresholds::BillingMode::TaggedSymbol, + cadence: + Orb::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol, composite_price_filters: T.nilable( T::Array[ - Orb::Price::MatrixWithDisplayName::CompositePriceFilter + Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter ] ), conversion_rate: T.nilable(Float), conversion_rate_config: T.nilable( - Orb::Price::MatrixWithDisplayName::ConversionRateConfig::Variants + Orb::Price::GroupedWithMinMaxThresholds::ConversionRateConfig::Variants ), created_at: Time, credit_allocation: T.nilable(Orb::Allocation), @@ -14884,12 +15063,12 @@ module Orb discount: T.nilable(Orb::Discount::Variants), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), + grouped_with_min_max_thresholds_config: + Orb::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: T.nilable(Orb::BillingCycleConfiguration), item: Orb::ItemSlim, - matrix_with_display_name_config: - Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig, maximum: T.nilable(Orb::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], @@ -14899,12 +15078,12 @@ module Orb name: String, plan_phase_order: T.nilable(Integer), price_type: - Orb::Price::MatrixWithDisplayName::PriceType::TaggedSymbol, + Orb::Price::GroupedWithMinMaxThresholds::PriceType::TaggedSymbol, replaces_price_id: T.nilable(String), dimensional_price_configuration: T.nilable(Orb::DimensionalPriceConfiguration), license_type: - T.nilable(Orb::Price::MatrixWithDisplayName::LicenseType) + T.nilable(Orb::Price::GroupedWithMinMaxThresholds::LicenseType) } ) end @@ -14916,25 +15095,28 @@ module Orb TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::MatrixWithDisplayName::BillingMode) + T.all( + Symbol, + Orb::Price::GroupedWithMinMaxThresholds::BillingMode + ) end OrSymbol = T.type_alias { T.any(Symbol, String) } IN_ADVANCE = T.let( :in_advance, - Orb::Price::MatrixWithDisplayName::BillingMode::TaggedSymbol + Orb::Price::GroupedWithMinMaxThresholds::BillingMode::TaggedSymbol ) IN_ARREAR = T.let( :in_arrear, - Orb::Price::MatrixWithDisplayName::BillingMode::TaggedSymbol + Orb::Price::GroupedWithMinMaxThresholds::BillingMode::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::MatrixWithDisplayName::BillingMode::TaggedSymbol + Orb::Price::GroupedWithMinMaxThresholds::BillingMode::TaggedSymbol ] ) end @@ -14947,44 +15129,46 @@ module Orb TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::MatrixWithDisplayName::Cadence) + T.all(Symbol, Orb::Price::GroupedWithMinMaxThresholds::Cadence) end OrSymbol = T.type_alias { T.any(Symbol, String) } ONE_TIME = T.let( :one_time, - Orb::Price::MatrixWithDisplayName::Cadence::TaggedSymbol + Orb::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Price::MatrixWithDisplayName::Cadence::TaggedSymbol + Orb::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Price::MatrixWithDisplayName::Cadence::TaggedSymbol + Orb::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Price::MatrixWithDisplayName::Cadence::TaggedSymbol + Orb::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) ANNUAL = T.let( :annual, - Orb::Price::MatrixWithDisplayName::Cadence::TaggedSymbol + Orb::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Price::MatrixWithDisplayName::Cadence::TaggedSymbol + Orb::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) sig do override.returns( - T::Array[Orb::Price::MatrixWithDisplayName::Cadence::TaggedSymbol] + T::Array[ + Orb::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ] ) end def self.values @@ -14995,7 +15179,7 @@ module Orb OrHash = T.type_alias do T.any( - Orb::Price::MatrixWithDisplayName::CompositePriceFilter, + Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter, Orb::Internal::AnyHash ) end @@ -15003,7 +15187,7 @@ module Orb # The property of the price to filter on. sig do returns( - Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Field::TaggedSymbol ) end attr_accessor :field @@ -15011,7 +15195,7 @@ module Orb # Should prices that match the filter be included or excluded. sig do returns( - Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Operator::TaggedSymbol ) end attr_accessor :operator @@ -15023,9 +15207,9 @@ module Orb sig do params( field: - Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Field::OrSymbol, + Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Field::OrSymbol, operator: - Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Operator::OrSymbol, + Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Operator::OrSymbol, values: T::Array[String] ).returns(T.attached_class) end @@ -15043,9 +15227,9 @@ module Orb override.returns( { field: - Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Field::TaggedSymbol, + Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Field::TaggedSymbol, operator: - Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Operator::TaggedSymbol, + Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Operator::TaggedSymbol, values: T::Array[String] } ) @@ -15061,7 +15245,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Field + Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Field ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -15069,33 +15253,33 @@ module Orb PRICE_ID = T.let( :price_id, - Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Field::TaggedSymbol ) ITEM_ID = T.let( :item_id, - Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Field::TaggedSymbol ) PRICE_TYPE = T.let( :price_type, - Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Field::TaggedSymbol ) CURRENCY = T.let( :currency, - Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Field::TaggedSymbol ) PRICING_UNIT_ID = T.let( :pricing_unit_id, - Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Field::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Field::TaggedSymbol ] ) end @@ -15111,7 +15295,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Operator + Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Operator ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -15119,18 +15303,18 @@ module Orb INCLUDES = T.let( :includes, - Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Operator::TaggedSymbol ) EXCLUDES = T.let( :excludes, - Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Operator::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::Operator::TaggedSymbol ] ) end @@ -15139,112 +15323,64 @@ module Orb end end - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig, + Orb::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, Orb::Internal::AnyHash ) end - # Used to determine the unit rate + # The event property used to group before applying thresholds sig { returns(String) } - attr_accessor :dimension + attr_accessor :grouping_key - # Apply per unit pricing to each dimension value - sig do - returns( - T::Array[ - Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts + # The maximum amount to charge each group + sig { returns(String) } + attr_accessor :maximum_charge - # Configuration for matrix_with_display_name pricing + # 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( - dimension: String, - unit_amounts: - T::Array[ - Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount::OrHash - ] + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String ).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: + # 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( { - dimension: String, - unit_amounts: - T::Array[ - Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount - ] + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } ) end def to_hash end - - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Price::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 module PriceType @@ -15252,30 +15388,30 @@ module Orb TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::MatrixWithDisplayName::PriceType) + T.all(Symbol, Orb::Price::GroupedWithMinMaxThresholds::PriceType) end OrSymbol = T.type_alias { T.any(Symbol, String) } USAGE_PRICE = T.let( :usage_price, - Orb::Price::MatrixWithDisplayName::PriceType::TaggedSymbol + Orb::Price::GroupedWithMinMaxThresholds::PriceType::TaggedSymbol ) FIXED_PRICE = T.let( :fixed_price, - Orb::Price::MatrixWithDisplayName::PriceType::TaggedSymbol + Orb::Price::GroupedWithMinMaxThresholds::PriceType::TaggedSymbol ) COMPOSITE_PRICE = T.let( :composite_price, - Orb::Price::MatrixWithDisplayName::PriceType::TaggedSymbol + Orb::Price::GroupedWithMinMaxThresholds::PriceType::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::MatrixWithDisplayName::PriceType::TaggedSymbol + Orb::Price::GroupedWithMinMaxThresholds::PriceType::TaggedSymbol ] ) end @@ -15287,7 +15423,7 @@ module Orb OrHash = T.type_alias do T.any( - Orb::Price::MatrixWithDisplayName::LicenseType, + Orb::Price::GroupedWithMinMaxThresholds::LicenseType, Orb::Internal::AnyHash ) end @@ -15332,10 +15468,10 @@ module Orb end end - class GroupedTieredPackage < Orb::Internal::Type::BaseModel + class MatrixWithDisplayName < Orb::Internal::Type::BaseModel OrHash = T.type_alias do - T.any(Orb::Price::GroupedTieredPackage, Orb::Internal::AnyHash) + T.any(Orb::Price::MatrixWithDisplayName, Orb::Internal::AnyHash) end sig { returns(String) } @@ -15362,17 +15498,19 @@ module Orb attr_writer :billing_cycle_configuration sig do - returns(Orb::Price::GroupedTieredPackage::BillingMode::TaggedSymbol) + returns(Orb::Price::MatrixWithDisplayName::BillingMode::TaggedSymbol) end attr_accessor :billing_mode - sig { returns(Orb::Price::GroupedTieredPackage::Cadence::TaggedSymbol) } + sig do + returns(Orb::Price::MatrixWithDisplayName::Cadence::TaggedSymbol) + end attr_accessor :cadence sig do returns( T.nilable( - T::Array[Orb::Price::GroupedTieredPackage::CompositePriceFilter] + T::Array[Orb::Price::MatrixWithDisplayName::CompositePriceFilter] ) ) end @@ -15384,7 +15522,7 @@ module Orb sig do returns( T.nilable( - Orb::Price::GroupedTieredPackage::ConversionRateConfig::Variants + Orb::Price::MatrixWithDisplayName::ConversionRateConfig::Variants ) ) end @@ -15413,20 +15551,6 @@ module Orb sig { returns(T.nilable(Float)) } attr_accessor :fixed_price_quantity - # Configuration for grouped_tiered_package pricing - sig do - returns(Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig) - end - attr_reader :grouped_tiered_package_config - - sig do - params( - grouped_tiered_package_config: - Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash - ).void - end - attr_writer :grouped_tiered_package_config - sig { returns(T.nilable(String)) } attr_accessor :invoice_grouping_key @@ -15449,6 +15573,22 @@ module Orb sig { params(item: Orb::ItemSlim::OrHash).void } attr_writer :item + # Configuration for matrix_with_display_name pricing + sig do + returns( + Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig + ) + end + attr_reader :matrix_with_display_name_config + + sig do + params( + matrix_with_display_name_config: + Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash + ).void + end + attr_writer :matrix_with_display_name_config + sig { returns(T.nilable(Orb::Maximum)) } attr_reader :maximum @@ -15485,7 +15625,7 @@ module Orb attr_accessor :plan_phase_order sig do - returns(Orb::Price::GroupedTieredPackage::PriceType::TaggedSymbol) + returns(Orb::Price::MatrixWithDisplayName::PriceType::TaggedSymbol) end attr_accessor :price_type @@ -15509,14 +15649,14 @@ module Orb # users. License types are used during billing by grouping metrics on the # configured grouping key. sig do - returns(T.nilable(Orb::Price::GroupedTieredPackage::LicenseType)) + returns(T.nilable(Orb::Price::MatrixWithDisplayName::LicenseType)) end attr_reader :license_type sig do params( license_type: - T.nilable(Orb::Price::GroupedTieredPackage::LicenseType::OrHash) + T.nilable(Orb::Price::MatrixWithDisplayName::LicenseType::OrHash) ).void end attr_writer :license_type @@ -15527,12 +15667,12 @@ module Orb billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash), billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash, billing_mode: - Orb::Price::GroupedTieredPackage::BillingMode::OrSymbol, - cadence: Orb::Price::GroupedTieredPackage::Cadence::OrSymbol, + Orb::Price::MatrixWithDisplayName::BillingMode::OrSymbol, + cadence: Orb::Price::MatrixWithDisplayName::Cadence::OrSymbol, composite_price_filters: T.nilable( T::Array[ - Orb::Price::GroupedTieredPackage::CompositePriceFilter::OrHash + Orb::Price::MatrixWithDisplayName::CompositePriceFilter::OrHash ] ), conversion_rate: T.nilable(Float), @@ -15557,12 +15697,12 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - grouped_tiered_package_config: - Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash, invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: T.nilable(Orb::BillingCycleConfiguration::OrHash), item: Orb::ItemSlim::OrHash, + matrix_with_display_name_config: + Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig::OrHash, maximum: T.nilable(Orb::Maximum::OrHash), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], @@ -15570,12 +15710,12 @@ module Orb minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), - price_type: Orb::Price::GroupedTieredPackage::PriceType::OrSymbol, + price_type: Orb::Price::MatrixWithDisplayName::PriceType::OrSymbol, replaces_price_id: T.nilable(String), dimensional_price_configuration: T.nilable(Orb::DimensionalPriceConfiguration::OrHash), license_type: - T.nilable(Orb::Price::GroupedTieredPackage::LicenseType::OrHash), + T.nilable(Orb::Price::MatrixWithDisplayName::LicenseType::OrHash), model_type: Symbol ).returns(T.attached_class) end @@ -15594,13 +15734,13 @@ module Orb discount:, external_price_id:, fixed_price_quantity:, - # Configuration for grouped_tiered_package pricing - grouped_tiered_package_config:, invoice_grouping_key:, invoicing_cycle_configuration:, # A minimal representation of an Item containing only the essential identifying # information. item:, + # Configuration for matrix_with_display_name pricing + matrix_with_display_name_config:, maximum:, maximum_amount:, # User specified key-value pairs for the resource. If not present, this defaults @@ -15622,7 +15762,7 @@ module Orb # configured grouping key. license_type: nil, # The pricing model type - model_type: :grouped_tiered_package + model_type: :matrix_with_display_name ) end @@ -15633,18 +15773,18 @@ module Orb billable_metric: T.nilable(Orb::BillableMetricTiny), billing_cycle_configuration: Orb::BillingCycleConfiguration, billing_mode: - Orb::Price::GroupedTieredPackage::BillingMode::TaggedSymbol, - cadence: Orb::Price::GroupedTieredPackage::Cadence::TaggedSymbol, + Orb::Price::MatrixWithDisplayName::BillingMode::TaggedSymbol, + cadence: Orb::Price::MatrixWithDisplayName::Cadence::TaggedSymbol, composite_price_filters: T.nilable( T::Array[ - Orb::Price::GroupedTieredPackage::CompositePriceFilter + Orb::Price::MatrixWithDisplayName::CompositePriceFilter ] ), conversion_rate: T.nilable(Float), conversion_rate_config: T.nilable( - Orb::Price::GroupedTieredPackage::ConversionRateConfig::Variants + Orb::Price::MatrixWithDisplayName::ConversionRateConfig::Variants ), created_at: Time, credit_allocation: T.nilable(Orb::Allocation), @@ -15652,12 +15792,12 @@ module Orb discount: T.nilable(Orb::Discount::Variants), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), - grouped_tiered_package_config: - Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig, invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: T.nilable(Orb::BillingCycleConfiguration), item: Orb::ItemSlim, + matrix_with_display_name_config: + Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig, maximum: T.nilable(Orb::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], @@ -15667,12 +15807,12 @@ module Orb name: String, plan_phase_order: T.nilable(Integer), price_type: - Orb::Price::GroupedTieredPackage::PriceType::TaggedSymbol, + Orb::Price::MatrixWithDisplayName::PriceType::TaggedSymbol, replaces_price_id: T.nilable(String), dimensional_price_configuration: T.nilable(Orb::DimensionalPriceConfiguration), license_type: - T.nilable(Orb::Price::GroupedTieredPackage::LicenseType) + T.nilable(Orb::Price::MatrixWithDisplayName::LicenseType) } ) end @@ -15684,25 +15824,25 @@ module Orb TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::GroupedTieredPackage::BillingMode) + T.all(Symbol, Orb::Price::MatrixWithDisplayName::BillingMode) end OrSymbol = T.type_alias { T.any(Symbol, String) } IN_ADVANCE = T.let( :in_advance, - Orb::Price::GroupedTieredPackage::BillingMode::TaggedSymbol + Orb::Price::MatrixWithDisplayName::BillingMode::TaggedSymbol ) IN_ARREAR = T.let( :in_arrear, - Orb::Price::GroupedTieredPackage::BillingMode::TaggedSymbol + Orb::Price::MatrixWithDisplayName::BillingMode::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::GroupedTieredPackage::BillingMode::TaggedSymbol + Orb::Price::MatrixWithDisplayName::BillingMode::TaggedSymbol ] ) end @@ -15715,44 +15855,44 @@ module Orb TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::GroupedTieredPackage::Cadence) + T.all(Symbol, Orb::Price::MatrixWithDisplayName::Cadence) end OrSymbol = T.type_alias { T.any(Symbol, String) } ONE_TIME = T.let( :one_time, - Orb::Price::GroupedTieredPackage::Cadence::TaggedSymbol + Orb::Price::MatrixWithDisplayName::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Price::GroupedTieredPackage::Cadence::TaggedSymbol + Orb::Price::MatrixWithDisplayName::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Price::GroupedTieredPackage::Cadence::TaggedSymbol + Orb::Price::MatrixWithDisplayName::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Price::GroupedTieredPackage::Cadence::TaggedSymbol + Orb::Price::MatrixWithDisplayName::Cadence::TaggedSymbol ) ANNUAL = T.let( :annual, - Orb::Price::GroupedTieredPackage::Cadence::TaggedSymbol + Orb::Price::MatrixWithDisplayName::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Price::GroupedTieredPackage::Cadence::TaggedSymbol + Orb::Price::MatrixWithDisplayName::Cadence::TaggedSymbol ) sig do override.returns( - T::Array[Orb::Price::GroupedTieredPackage::Cadence::TaggedSymbol] + T::Array[Orb::Price::MatrixWithDisplayName::Cadence::TaggedSymbol] ) end def self.values @@ -15763,7 +15903,7 @@ module Orb OrHash = T.type_alias do T.any( - Orb::Price::GroupedTieredPackage::CompositePriceFilter, + Orb::Price::MatrixWithDisplayName::CompositePriceFilter, Orb::Internal::AnyHash ) end @@ -15771,7 +15911,7 @@ module Orb # The property of the price to filter on. sig do returns( - Orb::Price::GroupedTieredPackage::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Field::TaggedSymbol ) end attr_accessor :field @@ -15779,7 +15919,7 @@ module Orb # Should prices that match the filter be included or excluded. sig do returns( - Orb::Price::GroupedTieredPackage::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Operator::TaggedSymbol ) end attr_accessor :operator @@ -15791,9 +15931,9 @@ module Orb sig do params( field: - Orb::Price::GroupedTieredPackage::CompositePriceFilter::Field::OrSymbol, + Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Field::OrSymbol, operator: - Orb::Price::GroupedTieredPackage::CompositePriceFilter::Operator::OrSymbol, + Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Operator::OrSymbol, values: T::Array[String] ).returns(T.attached_class) end @@ -15811,9 +15951,9 @@ module Orb override.returns( { field: - Orb::Price::GroupedTieredPackage::CompositePriceFilter::Field::TaggedSymbol, + Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Field::TaggedSymbol, operator: - Orb::Price::GroupedTieredPackage::CompositePriceFilter::Operator::TaggedSymbol, + Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Operator::TaggedSymbol, values: T::Array[String] } ) @@ -15829,7 +15969,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::GroupedTieredPackage::CompositePriceFilter::Field + Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Field ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -15837,33 +15977,33 @@ module Orb PRICE_ID = T.let( :price_id, - Orb::Price::GroupedTieredPackage::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Field::TaggedSymbol ) ITEM_ID = T.let( :item_id, - Orb::Price::GroupedTieredPackage::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Field::TaggedSymbol ) PRICE_TYPE = T.let( :price_type, - Orb::Price::GroupedTieredPackage::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Field::TaggedSymbol ) CURRENCY = T.let( :currency, - Orb::Price::GroupedTieredPackage::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Field::TaggedSymbol ) PRICING_UNIT_ID = T.let( :pricing_unit_id, - Orb::Price::GroupedTieredPackage::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Field::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::GroupedTieredPackage::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Field::TaggedSymbol ] ) end @@ -15879,7 +16019,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::GroupedTieredPackage::CompositePriceFilter::Operator + Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Operator ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -15887,18 +16027,18 @@ module Orb INCLUDES = T.let( :includes, - Orb::Price::GroupedTieredPackage::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Operator::TaggedSymbol ) EXCLUDES = T.let( :excludes, - Orb::Price::GroupedTieredPackage::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Operator::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::GroupedTieredPackage::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::MatrixWithDisplayName::CompositePriceFilter::Operator::TaggedSymbol ] ) end @@ -15907,62 +16047,54 @@ module Orb end end - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel + class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig, + Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig, Orb::Internal::AnyHash ) end - # The event property used to group before tiering - sig { returns(String) } - attr_accessor :grouping_key - + # Used to determine the unit rate sig { returns(String) } - attr_accessor :package_size + attr_accessor :dimension - # Apply tiered pricing after rounding up the quantity to the package size. Tiers - # are defined using exclusive lower bounds. + # Apply per unit pricing to each dimension value sig do returns( T::Array[ - Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig::Tier + Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount ] ) end - attr_accessor :tiers + attr_accessor :unit_amounts - # Configuration for grouped_tiered_package pricing + # Configuration for matrix_with_display_name pricing sig do params( - grouping_key: String, - package_size: String, - tiers: + dimension: String, + unit_amounts: T::Array[ - Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig::Tier::OrHash + Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount::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: + # Used to determine the unit rate + dimension:, + # Apply per unit pricing to each dimension value + unit_amounts: ) end sig do override.returns( { - grouping_key: String, - package_size: String, - tiers: + dimension: String, + unit_amounts: T::Array[ - Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig::Tier + Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount ] } ) @@ -15970,37 +16102,53 @@ module Orb def to_hash end - class Tier < Orb::Internal::Type::BaseModel + class UnitAmount < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig::Tier, + Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount, Orb::Internal::AnyHash ) end - # Per package + # The dimension value sig { returns(String) } - attr_accessor :per_unit + attr_accessor :dimension_value + # Display name for this dimension value sig { returns(String) } - attr_accessor :tier_lower_bound + attr_accessor :display_name - # Configuration for a single tier + # Per unit amount + sig { returns(String) } + attr_accessor :unit_amount + + # Configuration for a unit amount item sig do - params(per_unit: String, tier_lower_bound: String).returns( - T.attached_class - ) + params( + dimension_value: String, + display_name: String, + unit_amount: String + ).returns(T.attached_class) end def self.new( - # Per package - per_unit:, - tier_lower_bound: + # The dimension value + dimension_value:, + # Display name for this dimension value + display_name:, + # Per unit amount + unit_amount: ) end sig do - override.returns({ per_unit: String, tier_lower_bound: String }) + override.returns( + { + dimension_value: String, + display_name: String, + unit_amount: String + } + ) end def to_hash end @@ -16012,30 +16160,30 @@ module Orb TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::GroupedTieredPackage::PriceType) + T.all(Symbol, Orb::Price::MatrixWithDisplayName::PriceType) end OrSymbol = T.type_alias { T.any(Symbol, String) } USAGE_PRICE = T.let( :usage_price, - Orb::Price::GroupedTieredPackage::PriceType::TaggedSymbol + Orb::Price::MatrixWithDisplayName::PriceType::TaggedSymbol ) FIXED_PRICE = T.let( :fixed_price, - Orb::Price::GroupedTieredPackage::PriceType::TaggedSymbol + Orb::Price::MatrixWithDisplayName::PriceType::TaggedSymbol ) COMPOSITE_PRICE = T.let( :composite_price, - Orb::Price::GroupedTieredPackage::PriceType::TaggedSymbol + Orb::Price::MatrixWithDisplayName::PriceType::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::GroupedTieredPackage::PriceType::TaggedSymbol + Orb::Price::MatrixWithDisplayName::PriceType::TaggedSymbol ] ) end @@ -16047,7 +16195,7 @@ module Orb OrHash = T.type_alias do T.any( - Orb::Price::GroupedTieredPackage::LicenseType, + Orb::Price::MatrixWithDisplayName::LicenseType, Orb::Internal::AnyHash ) end @@ -16092,10 +16240,10 @@ module Orb end end - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel + class GroupedTieredPackage < Orb::Internal::Type::BaseModel OrHash = T.type_alias do - T.any(Orb::Price::MaxGroupTieredPackage, Orb::Internal::AnyHash) + T.any(Orb::Price::GroupedTieredPackage, Orb::Internal::AnyHash) end sig { returns(String) } @@ -16122,19 +16270,17 @@ module Orb attr_writer :billing_cycle_configuration sig do - returns(Orb::Price::MaxGroupTieredPackage::BillingMode::TaggedSymbol) + returns(Orb::Price::GroupedTieredPackage::BillingMode::TaggedSymbol) end attr_accessor :billing_mode - sig do - returns(Orb::Price::MaxGroupTieredPackage::Cadence::TaggedSymbol) - end + sig { returns(Orb::Price::GroupedTieredPackage::Cadence::TaggedSymbol) } attr_accessor :cadence sig do returns( T.nilable( - T::Array[Orb::Price::MaxGroupTieredPackage::CompositePriceFilter] + T::Array[Orb::Price::GroupedTieredPackage::CompositePriceFilter] ) ) end @@ -16146,7 +16292,7 @@ module Orb sig do returns( T.nilable( - Orb::Price::MaxGroupTieredPackage::ConversionRateConfig::Variants + Orb::Price::GroupedTieredPackage::ConversionRateConfig::Variants ) ) end @@ -16175,6 +16321,20 @@ module Orb sig { returns(T.nilable(Float)) } attr_accessor :fixed_price_quantity + # Configuration for grouped_tiered_package pricing + sig do + returns(Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig) + end + attr_reader :grouped_tiered_package_config + + sig do + params( + grouped_tiered_package_config: + Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash + ).void + end + attr_writer :grouped_tiered_package_config + sig { returns(T.nilable(String)) } attr_accessor :invoice_grouping_key @@ -16197,22 +16357,6 @@ module Orb sig { params(item: Orb::ItemSlim::OrHash).void } attr_writer :item - # Configuration for max_group_tiered_package pricing - sig do - returns( - Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig - ) - end - attr_reader :max_group_tiered_package_config - - sig do - params( - max_group_tiered_package_config: - Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash - ).void - end - attr_writer :max_group_tiered_package_config - sig { returns(T.nilable(Orb::Maximum)) } attr_reader :maximum @@ -16249,7 +16393,7 @@ module Orb attr_accessor :plan_phase_order sig do - returns(Orb::Price::MaxGroupTieredPackage::PriceType::TaggedSymbol) + returns(Orb::Price::GroupedTieredPackage::PriceType::TaggedSymbol) end attr_accessor :price_type @@ -16273,14 +16417,14 @@ module Orb # users. License types are used during billing by grouping metrics on the # configured grouping key. sig do - returns(T.nilable(Orb::Price::MaxGroupTieredPackage::LicenseType)) + returns(T.nilable(Orb::Price::GroupedTieredPackage::LicenseType)) end attr_reader :license_type sig do params( license_type: - T.nilable(Orb::Price::MaxGroupTieredPackage::LicenseType::OrHash) + T.nilable(Orb::Price::GroupedTieredPackage::LicenseType::OrHash) ).void end attr_writer :license_type @@ -16291,12 +16435,12 @@ module Orb billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash), billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash, billing_mode: - Orb::Price::MaxGroupTieredPackage::BillingMode::OrSymbol, - cadence: Orb::Price::MaxGroupTieredPackage::Cadence::OrSymbol, + Orb::Price::GroupedTieredPackage::BillingMode::OrSymbol, + cadence: Orb::Price::GroupedTieredPackage::Cadence::OrSymbol, composite_price_filters: T.nilable( T::Array[ - Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::OrHash + Orb::Price::GroupedTieredPackage::CompositePriceFilter::OrHash ] ), conversion_rate: T.nilable(Float), @@ -16321,12 +16465,12 @@ module Orb ), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), + grouped_tiered_package_config: + Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig::OrHash, invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: T.nilable(Orb::BillingCycleConfiguration::OrHash), item: Orb::ItemSlim::OrHash, - max_group_tiered_package_config: - Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash, maximum: T.nilable(Orb::Maximum::OrHash), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], @@ -16334,12 +16478,12 @@ module Orb minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), - price_type: Orb::Price::MaxGroupTieredPackage::PriceType::OrSymbol, + price_type: Orb::Price::GroupedTieredPackage::PriceType::OrSymbol, replaces_price_id: T.nilable(String), dimensional_price_configuration: T.nilable(Orb::DimensionalPriceConfiguration::OrHash), license_type: - T.nilable(Orb::Price::MaxGroupTieredPackage::LicenseType::OrHash), + T.nilable(Orb::Price::GroupedTieredPackage::LicenseType::OrHash), model_type: Symbol ).returns(T.attached_class) end @@ -16358,13 +16502,13 @@ module Orb discount:, external_price_id:, fixed_price_quantity:, + # Configuration for grouped_tiered_package pricing + grouped_tiered_package_config:, invoice_grouping_key:, invoicing_cycle_configuration:, # A minimal representation of an Item containing only the essential identifying # information. item:, - # Configuration for max_group_tiered_package pricing - max_group_tiered_package_config:, maximum:, maximum_amount:, # User specified key-value pairs for the resource. If not present, this defaults @@ -16386,7 +16530,7 @@ module Orb # configured grouping key. license_type: nil, # The pricing model type - model_type: :max_group_tiered_package + model_type: :grouped_tiered_package ) end @@ -16397,18 +16541,18 @@ module Orb billable_metric: T.nilable(Orb::BillableMetricTiny), billing_cycle_configuration: Orb::BillingCycleConfiguration, billing_mode: - Orb::Price::MaxGroupTieredPackage::BillingMode::TaggedSymbol, - cadence: Orb::Price::MaxGroupTieredPackage::Cadence::TaggedSymbol, + Orb::Price::GroupedTieredPackage::BillingMode::TaggedSymbol, + cadence: Orb::Price::GroupedTieredPackage::Cadence::TaggedSymbol, composite_price_filters: T.nilable( T::Array[ - Orb::Price::MaxGroupTieredPackage::CompositePriceFilter + Orb::Price::GroupedTieredPackage::CompositePriceFilter ] ), conversion_rate: T.nilable(Float), conversion_rate_config: T.nilable( - Orb::Price::MaxGroupTieredPackage::ConversionRateConfig::Variants + Orb::Price::GroupedTieredPackage::ConversionRateConfig::Variants ), created_at: Time, credit_allocation: T.nilable(Orb::Allocation), @@ -16416,12 +16560,12 @@ module Orb discount: T.nilable(Orb::Discount::Variants), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), + grouped_tiered_package_config: + Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig, invoice_grouping_key: T.nilable(String), invoicing_cycle_configuration: T.nilable(Orb::BillingCycleConfiguration), item: Orb::ItemSlim, - max_group_tiered_package_config: - Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, maximum: T.nilable(Orb::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], @@ -16431,12 +16575,12 @@ module Orb name: String, plan_phase_order: T.nilable(Integer), price_type: - Orb::Price::MaxGroupTieredPackage::PriceType::TaggedSymbol, + Orb::Price::GroupedTieredPackage::PriceType::TaggedSymbol, replaces_price_id: T.nilable(String), dimensional_price_configuration: T.nilable(Orb::DimensionalPriceConfiguration), license_type: - T.nilable(Orb::Price::MaxGroupTieredPackage::LicenseType) + T.nilable(Orb::Price::GroupedTieredPackage::LicenseType) } ) end @@ -16448,25 +16592,25 @@ module Orb TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::MaxGroupTieredPackage::BillingMode) + T.all(Symbol, Orb::Price::GroupedTieredPackage::BillingMode) end OrSymbol = T.type_alias { T.any(Symbol, String) } IN_ADVANCE = T.let( :in_advance, - Orb::Price::MaxGroupTieredPackage::BillingMode::TaggedSymbol + Orb::Price::GroupedTieredPackage::BillingMode::TaggedSymbol ) IN_ARREAR = T.let( :in_arrear, - Orb::Price::MaxGroupTieredPackage::BillingMode::TaggedSymbol + Orb::Price::GroupedTieredPackage::BillingMode::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::MaxGroupTieredPackage::BillingMode::TaggedSymbol + Orb::Price::GroupedTieredPackage::BillingMode::TaggedSymbol ] ) end @@ -16479,44 +16623,44 @@ module Orb TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::MaxGroupTieredPackage::Cadence) + T.all(Symbol, Orb::Price::GroupedTieredPackage::Cadence) end OrSymbol = T.type_alias { T.any(Symbol, String) } ONE_TIME = T.let( :one_time, - Orb::Price::MaxGroupTieredPackage::Cadence::TaggedSymbol + Orb::Price::GroupedTieredPackage::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Price::MaxGroupTieredPackage::Cadence::TaggedSymbol + Orb::Price::GroupedTieredPackage::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Price::MaxGroupTieredPackage::Cadence::TaggedSymbol + Orb::Price::GroupedTieredPackage::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Price::MaxGroupTieredPackage::Cadence::TaggedSymbol + Orb::Price::GroupedTieredPackage::Cadence::TaggedSymbol ) ANNUAL = T.let( :annual, - Orb::Price::MaxGroupTieredPackage::Cadence::TaggedSymbol + Orb::Price::GroupedTieredPackage::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Price::MaxGroupTieredPackage::Cadence::TaggedSymbol + Orb::Price::GroupedTieredPackage::Cadence::TaggedSymbol ) sig do override.returns( - T::Array[Orb::Price::MaxGroupTieredPackage::Cadence::TaggedSymbol] + T::Array[Orb::Price::GroupedTieredPackage::Cadence::TaggedSymbol] ) end def self.values @@ -16527,7 +16671,7 @@ module Orb OrHash = T.type_alias do T.any( - Orb::Price::MaxGroupTieredPackage::CompositePriceFilter, + Orb::Price::GroupedTieredPackage::CompositePriceFilter, Orb::Internal::AnyHash ) end @@ -16535,7 +16679,7 @@ module Orb # The property of the price to filter on. sig do returns( - Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedTieredPackage::CompositePriceFilter::Field::TaggedSymbol ) end attr_accessor :field @@ -16543,7 +16687,7 @@ module Orb # Should prices that match the filter be included or excluded. sig do returns( - Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::GroupedTieredPackage::CompositePriceFilter::Operator::TaggedSymbol ) end attr_accessor :operator @@ -16555,9 +16699,9 @@ module Orb sig do params( field: - Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Field::OrSymbol, + Orb::Price::GroupedTieredPackage::CompositePriceFilter::Field::OrSymbol, operator: - Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Operator::OrSymbol, + Orb::Price::GroupedTieredPackage::CompositePriceFilter::Operator::OrSymbol, values: T::Array[String] ).returns(T.attached_class) end @@ -16575,9 +16719,9 @@ module Orb override.returns( { field: - Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Field::TaggedSymbol, + Orb::Price::GroupedTieredPackage::CompositePriceFilter::Field::TaggedSymbol, operator: - Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Operator::TaggedSymbol, + Orb::Price::GroupedTieredPackage::CompositePriceFilter::Operator::TaggedSymbol, values: T::Array[String] } ) @@ -16593,7 +16737,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Field + Orb::Price::GroupedTieredPackage::CompositePriceFilter::Field ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -16601,33 +16745,33 @@ module Orb PRICE_ID = T.let( :price_id, - Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedTieredPackage::CompositePriceFilter::Field::TaggedSymbol ) ITEM_ID = T.let( :item_id, - Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedTieredPackage::CompositePriceFilter::Field::TaggedSymbol ) PRICE_TYPE = T.let( :price_type, - Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedTieredPackage::CompositePriceFilter::Field::TaggedSymbol ) CURRENCY = T.let( :currency, - Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedTieredPackage::CompositePriceFilter::Field::TaggedSymbol ) PRICING_UNIT_ID = T.let( :pricing_unit_id, - Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedTieredPackage::CompositePriceFilter::Field::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::GroupedTieredPackage::CompositePriceFilter::Field::TaggedSymbol ] ) end @@ -16643,7 +16787,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Operator + Orb::Price::GroupedTieredPackage::CompositePriceFilter::Operator ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -16651,18 +16795,18 @@ module Orb INCLUDES = T.let( :includes, - Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::GroupedTieredPackage::CompositePriceFilter::Operator::TaggedSymbol ) EXCLUDES = T.let( :excludes, - Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::GroupedTieredPackage::CompositePriceFilter::Operator::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::GroupedTieredPackage::CompositePriceFilter::Operator::TaggedSymbol ] ) end @@ -16671,48 +16815,50 @@ module Orb end end - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel + class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, + Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig, Orb::Internal::AnyHash ) end - # The event property used to group before tiering the group with the highest value + # 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 to the largest group after grouping with the provided 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::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier + Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig::Tier ] ) end attr_accessor :tiers - # Configuration for max_group_tiered_package pricing + # Configuration for grouped_tiered_package pricing sig do params( grouping_key: String, package_size: String, tiers: T::Array[ - Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier::OrHash + Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig::Tier::OrHash ] ).returns(T.attached_class) end def self.new( - # The event property used to group before tiering the group with the highest value + # The event property used to group before tiering grouping_key:, package_size:, - # Apply tiered pricing to the largest group after grouping with the provided key. + # Apply tiered pricing after rounding up the quantity to the package size. Tiers + # are defined using exclusive lower bounds. tiers: ) end @@ -16724,7 +16870,7 @@ module Orb package_size: String, tiers: T::Array[ - Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier + Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig::Tier ] } ) @@ -16736,35 +16882,33 @@ module Orb OrHash = T.type_alias do T.any( - Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier, + Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig::Tier, Orb::Internal::AnyHash ) end + # Per package sig { returns(String) } - attr_accessor :tier_lower_bound + attr_accessor :per_unit - # Per unit amount sig { returns(String) } - attr_accessor :unit_amount + attr_accessor :tier_lower_bound # Configuration for a single tier sig do - params(tier_lower_bound: String, unit_amount: String).returns( + params(per_unit: String, tier_lower_bound: String).returns( T.attached_class ) end def self.new( - tier_lower_bound:, - # Per unit amount - unit_amount: + # Per package + per_unit:, + tier_lower_bound: ) end sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) + override.returns({ per_unit: String, tier_lower_bound: String }) end def to_hash end @@ -16776,30 +16920,30 @@ module Orb TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::MaxGroupTieredPackage::PriceType) + T.all(Symbol, Orb::Price::GroupedTieredPackage::PriceType) end OrSymbol = T.type_alias { T.any(Symbol, String) } USAGE_PRICE = T.let( :usage_price, - Orb::Price::MaxGroupTieredPackage::PriceType::TaggedSymbol + Orb::Price::GroupedTieredPackage::PriceType::TaggedSymbol ) FIXED_PRICE = T.let( :fixed_price, - Orb::Price::MaxGroupTieredPackage::PriceType::TaggedSymbol + Orb::Price::GroupedTieredPackage::PriceType::TaggedSymbol ) COMPOSITE_PRICE = T.let( :composite_price, - Orb::Price::MaxGroupTieredPackage::PriceType::TaggedSymbol + Orb::Price::GroupedTieredPackage::PriceType::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::MaxGroupTieredPackage::PriceType::TaggedSymbol + Orb::Price::GroupedTieredPackage::PriceType::TaggedSymbol ] ) end @@ -16811,7 +16955,7 @@ module Orb OrHash = T.type_alias do T.any( - Orb::Price::MaxGroupTieredPackage::LicenseType, + Orb::Price::GroupedTieredPackage::LicenseType, Orb::Internal::AnyHash ) end @@ -16856,13 +17000,10 @@ module Orb end end - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel + class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel OrHash = T.type_alias do - T.any( - Orb::Price::ScalableMatrixWithUnitPricing, - Orb::Internal::AnyHash - ) + T.any(Orb::Price::MaxGroupTieredPackage, Orb::Internal::AnyHash) end sig { returns(String) } @@ -16889,25 +17030,19 @@ module Orb attr_writer :billing_cycle_configuration sig do - returns( - Orb::Price::ScalableMatrixWithUnitPricing::BillingMode::TaggedSymbol - ) + returns(Orb::Price::MaxGroupTieredPackage::BillingMode::TaggedSymbol) end attr_accessor :billing_mode sig do - returns( - Orb::Price::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ) + returns(Orb::Price::MaxGroupTieredPackage::Cadence::TaggedSymbol) end attr_accessor :cadence sig do returns( T.nilable( - T::Array[ - Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter - ] + T::Array[Orb::Price::MaxGroupTieredPackage::CompositePriceFilter] ) ) end @@ -16919,7 +17054,7 @@ module Orb sig do returns( T.nilable( - Orb::Price::ScalableMatrixWithUnitPricing::ConversionRateConfig::Variants + Orb::Price::MaxGroupTieredPackage::ConversionRateConfig::Variants ) ) end @@ -16970,6 +17105,22 @@ module Orb sig { params(item: Orb::ItemSlim::OrHash).void } attr_writer :item + # Configuration for max_group_tiered_package pricing + sig do + returns( + Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig + ) + end + attr_reader :max_group_tiered_package_config + + sig do + params( + max_group_tiered_package_config: + Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash + ).void + end + attr_writer :max_group_tiered_package_config + sig { returns(T.nilable(Orb::Maximum)) } attr_reader :maximum @@ -17006,9 +17157,7 @@ module Orb attr_accessor :plan_phase_order sig do - returns( - Orb::Price::ScalableMatrixWithUnitPricing::PriceType::TaggedSymbol - ) + returns(Orb::Price::MaxGroupTieredPackage::PriceType::TaggedSymbol) end attr_accessor :price_type @@ -17017,22 +17166,6 @@ module Orb sig { returns(T.nilable(String)) } attr_accessor :replaces_price_id - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - returns( - Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig - ) - end - attr_reader :scalable_matrix_with_unit_pricing_config - - sig do - params( - scalable_matrix_with_unit_pricing_config: - Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_unit_pricing_config - sig { returns(T.nilable(Orb::DimensionalPriceConfiguration)) } attr_reader :dimensional_price_configuration @@ -17048,18 +17181,14 @@ module Orb # users. License types are used during billing by grouping metrics on the # configured grouping key. sig do - returns( - T.nilable(Orb::Price::ScalableMatrixWithUnitPricing::LicenseType) - ) + returns(T.nilable(Orb::Price::MaxGroupTieredPackage::LicenseType)) end attr_reader :license_type sig do params( license_type: - T.nilable( - Orb::Price::ScalableMatrixWithUnitPricing::LicenseType::OrHash - ) + T.nilable(Orb::Price::MaxGroupTieredPackage::LicenseType::OrHash) ).void end attr_writer :license_type @@ -17070,13 +17199,12 @@ module Orb billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash), billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash, billing_mode: - Orb::Price::ScalableMatrixWithUnitPricing::BillingMode::OrSymbol, - cadence: - Orb::Price::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, + Orb::Price::MaxGroupTieredPackage::BillingMode::OrSymbol, + cadence: Orb::Price::MaxGroupTieredPackage::Cadence::OrSymbol, composite_price_filters: T.nilable( T::Array[ - Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::OrHash + Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::OrHash ] ), conversion_rate: T.nilable(Float), @@ -17105,6 +17233,8 @@ module Orb invoicing_cycle_configuration: T.nilable(Orb::BillingCycleConfiguration::OrHash), item: Orb::ItemSlim::OrHash, + max_group_tiered_package_config: + Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::OrHash, maximum: T.nilable(Orb::Maximum::OrHash), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], @@ -17112,17 +17242,12 @@ module Orb minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), - price_type: - Orb::Price::ScalableMatrixWithUnitPricing::PriceType::OrSymbol, + price_type: Orb::Price::MaxGroupTieredPackage::PriceType::OrSymbol, replaces_price_id: T.nilable(String), - scalable_matrix_with_unit_pricing_config: - Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash, dimensional_price_configuration: T.nilable(Orb::DimensionalPriceConfiguration::OrHash), license_type: - T.nilable( - Orb::Price::ScalableMatrixWithUnitPricing::LicenseType::OrHash - ), + T.nilable(Orb::Price::MaxGroupTieredPackage::LicenseType::OrHash), model_type: Symbol ).returns(T.attached_class) end @@ -17146,6 +17271,8 @@ module Orb # A minimal representation of an Item containing only the essential identifying # information. item:, + # Configuration for max_group_tiered_package pricing + max_group_tiered_package_config:, maximum:, maximum_amount:, # User specified key-value pairs for the resource. If not present, this defaults @@ -17161,15 +17288,13 @@ module Orb # The price id this price replaces. This price will take the place of the replaced # price in plan version migrations. replaces_price_id:, - # Configuration for scalable_matrix_with_unit_pricing pricing - scalable_matrix_with_unit_pricing_config:, dimensional_price_configuration: nil, # The LicenseType resource represents a type of license that can be assigned to # users. License types are used during billing by grouping metrics on the # configured grouping key. license_type: nil, # The pricing model type - model_type: :scalable_matrix_with_unit_pricing + model_type: :max_group_tiered_package ) end @@ -17180,19 +17305,18 @@ module Orb billable_metric: T.nilable(Orb::BillableMetricTiny), billing_cycle_configuration: Orb::BillingCycleConfiguration, billing_mode: - Orb::Price::ScalableMatrixWithUnitPricing::BillingMode::TaggedSymbol, - cadence: - Orb::Price::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol, + Orb::Price::MaxGroupTieredPackage::BillingMode::TaggedSymbol, + cadence: Orb::Price::MaxGroupTieredPackage::Cadence::TaggedSymbol, composite_price_filters: T.nilable( T::Array[ - Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter + Orb::Price::MaxGroupTieredPackage::CompositePriceFilter ] ), conversion_rate: T.nilable(Float), conversion_rate_config: T.nilable( - Orb::Price::ScalableMatrixWithUnitPricing::ConversionRateConfig::Variants + Orb::Price::MaxGroupTieredPackage::ConversionRateConfig::Variants ), created_at: Time, credit_allocation: T.nilable(Orb::Allocation), @@ -17204,6 +17328,8 @@ module Orb invoicing_cycle_configuration: T.nilable(Orb::BillingCycleConfiguration), item: Orb::ItemSlim, + max_group_tiered_package_config: + Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, maximum: T.nilable(Orb::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], @@ -17213,16 +17339,12 @@ module Orb name: String, plan_phase_order: T.nilable(Integer), price_type: - Orb::Price::ScalableMatrixWithUnitPricing::PriceType::TaggedSymbol, + Orb::Price::MaxGroupTieredPackage::PriceType::TaggedSymbol, replaces_price_id: T.nilable(String), - scalable_matrix_with_unit_pricing_config: - Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, dimensional_price_configuration: T.nilable(Orb::DimensionalPriceConfiguration), license_type: - T.nilable( - Orb::Price::ScalableMatrixWithUnitPricing::LicenseType - ) + T.nilable(Orb::Price::MaxGroupTieredPackage::LicenseType) } ) end @@ -17234,28 +17356,25 @@ module Orb TaggedSymbol = T.type_alias do - T.all( - Symbol, - Orb::Price::ScalableMatrixWithUnitPricing::BillingMode - ) + T.all(Symbol, Orb::Price::MaxGroupTieredPackage::BillingMode) end OrSymbol = T.type_alias { T.any(Symbol, String) } IN_ADVANCE = T.let( :in_advance, - Orb::Price::ScalableMatrixWithUnitPricing::BillingMode::TaggedSymbol + Orb::Price::MaxGroupTieredPackage::BillingMode::TaggedSymbol ) IN_ARREAR = T.let( :in_arrear, - Orb::Price::ScalableMatrixWithUnitPricing::BillingMode::TaggedSymbol + Orb::Price::MaxGroupTieredPackage::BillingMode::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::ScalableMatrixWithUnitPricing::BillingMode::TaggedSymbol + Orb::Price::MaxGroupTieredPackage::BillingMode::TaggedSymbol ] ) end @@ -17268,46 +17387,44 @@ module Orb TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::ScalableMatrixWithUnitPricing::Cadence) + T.all(Symbol, Orb::Price::MaxGroupTieredPackage::Cadence) end OrSymbol = T.type_alias { T.any(Symbol, String) } ONE_TIME = T.let( :one_time, - Orb::Price::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol + Orb::Price::MaxGroupTieredPackage::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Price::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol + Orb::Price::MaxGroupTieredPackage::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Price::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol + Orb::Price::MaxGroupTieredPackage::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Price::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol + Orb::Price::MaxGroupTieredPackage::Cadence::TaggedSymbol ) ANNUAL = T.let( :annual, - Orb::Price::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol + Orb::Price::MaxGroupTieredPackage::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Price::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol + Orb::Price::MaxGroupTieredPackage::Cadence::TaggedSymbol ) sig do override.returns( - T::Array[ - Orb::Price::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol - ] + T::Array[Orb::Price::MaxGroupTieredPackage::Cadence::TaggedSymbol] ) end def self.values @@ -17318,7 +17435,7 @@ module Orb OrHash = T.type_alias do T.any( - Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter, + Orb::Price::MaxGroupTieredPackage::CompositePriceFilter, Orb::Internal::AnyHash ) end @@ -17326,7 +17443,7 @@ module Orb # The property of the price to filter on. sig do returns( - Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Field::TaggedSymbol ) end attr_accessor :field @@ -17334,7 +17451,7 @@ module Orb # Should prices that match the filter be included or excluded. sig do returns( - Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Operator::TaggedSymbol ) end attr_accessor :operator @@ -17346,9 +17463,9 @@ module Orb sig do params( field: - Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Field::OrSymbol, + Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Field::OrSymbol, operator: - Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Operator::OrSymbol, + Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Operator::OrSymbol, values: T::Array[String] ).returns(T.attached_class) end @@ -17366,9 +17483,9 @@ module Orb override.returns( { field: - Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Field::TaggedSymbol, + Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Field::TaggedSymbol, operator: - Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Operator::TaggedSymbol, + Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Operator::TaggedSymbol, values: T::Array[String] } ) @@ -17384,7 +17501,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Field + Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Field ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -17392,33 +17509,33 @@ module Orb PRICE_ID = T.let( :price_id, - Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Field::TaggedSymbol ) ITEM_ID = T.let( :item_id, - Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Field::TaggedSymbol ) PRICE_TYPE = T.let( :price_type, - Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Field::TaggedSymbol ) CURRENCY = T.let( :currency, - Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Field::TaggedSymbol ) PRICING_UNIT_ID = T.let( :pricing_unit_id, - Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Field::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Field::TaggedSymbol ] ) end @@ -17434,7 +17551,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Operator + Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Operator ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -17442,18 +17559,18 @@ module Orb INCLUDES = T.let( :includes, - Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Operator::TaggedSymbol ) EXCLUDES = T.let( :excludes, - Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Operator::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::MaxGroupTieredPackage::CompositePriceFilter::Operator::TaggedSymbol ] ) end @@ -17462,172 +17579,99 @@ module Orb end end - module PriceType - extend Orb::Internal::Type::Enum - - TaggedSymbol = + class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel + OrHash = T.type_alias do - T.all( - Symbol, - Orb::Price::ScalableMatrixWithUnitPricing::PriceType + T.any( + Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, + Orb::Internal::AnyHash ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - USAGE_PRICE = - T.let( - :usage_price, - Orb::Price::ScalableMatrixWithUnitPricing::PriceType::TaggedSymbol - ) - FIXED_PRICE = - T.let( - :fixed_price, - Orb::Price::ScalableMatrixWithUnitPricing::PriceType::TaggedSymbol - ) - COMPOSITE_PRICE = - T.let( - :composite_price, - Orb::Price::ScalableMatrixWithUnitPricing::PriceType::TaggedSymbol - ) + # 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 - override.returns( + returns( T::Array[ - Orb::Price::ScalableMatrixWithUnitPricing::PriceType::TaggedSymbol + Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier ] ) end - def self.values - end - end + attr_accessor :tiers - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Price::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::Price::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 + # Configuration for max_group_tiered_package pricing sig do params( - first_dimension: String, - matrix_scaling_factors: + grouping_key: String, + package_size: String, + tiers: T::Array[ - Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor::OrHash - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) + Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier::OrHash + ] ).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 + # 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( { - first_dimension: String, - matrix_scaling_factors: + grouping_key: String, + package_size: String, + tiers: T::Array[ - Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) + Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier + ] } ) end def to_hash end - class MatrixScalingFactor < Orb::Internal::Type::BaseModel + class Tier < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor, + Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier, Orb::Internal::AnyHash ) end sig { returns(String) } - attr_accessor :first_dimension_value + attr_accessor :tier_lower_bound + # Per unit amount sig { returns(String) } - attr_accessor :scaling_factor - - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value + attr_accessor :unit_amount - # Configuration for a single matrix scaling factor + # Configuration for a single tier sig do - params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - ).returns(T.attached_class) + params(tier_lower_bound: String, unit_amount: String).returns( + T.attached_class + ) end def self.new( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil + tier_lower_bound:, + # Per unit amount + unit_amount: ) end sig do override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } + { tier_lower_bound: String, unit_amount: String } ) end def to_hash @@ -17635,11 +17679,47 @@ module Orb end end + module PriceType + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::Price::MaxGroupTieredPackage::PriceType) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + USAGE_PRICE = + T.let( + :usage_price, + Orb::Price::MaxGroupTieredPackage::PriceType::TaggedSymbol + ) + FIXED_PRICE = + T.let( + :fixed_price, + Orb::Price::MaxGroupTieredPackage::PriceType::TaggedSymbol + ) + COMPOSITE_PRICE = + T.let( + :composite_price, + Orb::Price::MaxGroupTieredPackage::PriceType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::MaxGroupTieredPackage::PriceType::TaggedSymbol + ] + ) + end + def self.values + end + end + class LicenseType < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Price::ScalableMatrixWithUnitPricing::LicenseType, + Orb::Price::MaxGroupTieredPackage::LicenseType, Orb::Internal::AnyHash ) end @@ -17684,11 +17764,11 @@ module Orb end end - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel + class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Price::ScalableMatrixWithTieredPricing, + Orb::Price::ScalableMatrixWithUnitPricing, Orb::Internal::AnyHash ) end @@ -17718,14 +17798,14 @@ module Orb sig do returns( - Orb::Price::ScalableMatrixWithTieredPricing::BillingMode::TaggedSymbol + Orb::Price::ScalableMatrixWithUnitPricing::BillingMode::TaggedSymbol ) end attr_accessor :billing_mode sig do returns( - Orb::Price::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol + Orb::Price::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol ) end attr_accessor :cadence @@ -17734,7 +17814,7 @@ module Orb returns( T.nilable( T::Array[ - Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter + Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter ] ) ) @@ -17747,7 +17827,7 @@ module Orb sig do returns( T.nilable( - Orb::Price::ScalableMatrixWithTieredPricing::ConversionRateConfig::Variants + Orb::Price::ScalableMatrixWithUnitPricing::ConversionRateConfig::Variants ) ) end @@ -17835,7 +17915,7 @@ module Orb sig do returns( - Orb::Price::ScalableMatrixWithTieredPricing::PriceType::TaggedSymbol + Orb::Price::ScalableMatrixWithUnitPricing::PriceType::TaggedSymbol ) end attr_accessor :price_type @@ -17845,21 +17925,21 @@ module Orb sig { returns(T.nilable(String)) } attr_accessor :replaces_price_id - # Configuration for scalable_matrix_with_tiered_pricing pricing + # Configuration for scalable_matrix_with_unit_pricing pricing sig do returns( - Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig + Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig ) end - attr_reader :scalable_matrix_with_tiered_pricing_config + attr_reader :scalable_matrix_with_unit_pricing_config sig do params( - scalable_matrix_with_tiered_pricing_config: - Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash + scalable_matrix_with_unit_pricing_config: + Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash ).void end - attr_writer :scalable_matrix_with_tiered_pricing_config + attr_writer :scalable_matrix_with_unit_pricing_config sig { returns(T.nilable(Orb::DimensionalPriceConfiguration)) } attr_reader :dimensional_price_configuration @@ -17877,7 +17957,7 @@ module Orb # configured grouping key. sig do returns( - T.nilable(Orb::Price::ScalableMatrixWithTieredPricing::LicenseType) + T.nilable(Orb::Price::ScalableMatrixWithUnitPricing::LicenseType) ) end attr_reader :license_type @@ -17886,7 +17966,7 @@ module Orb params( license_type: T.nilable( - Orb::Price::ScalableMatrixWithTieredPricing::LicenseType::OrHash + Orb::Price::ScalableMatrixWithUnitPricing::LicenseType::OrHash ) ).void end @@ -17898,13 +17978,13 @@ module Orb billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash), billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash, billing_mode: - Orb::Price::ScalableMatrixWithTieredPricing::BillingMode::OrSymbol, + Orb::Price::ScalableMatrixWithUnitPricing::BillingMode::OrSymbol, cadence: - Orb::Price::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, + Orb::Price::ScalableMatrixWithUnitPricing::Cadence::OrSymbol, composite_price_filters: T.nilable( T::Array[ - Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::OrHash + Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::OrHash ] ), conversion_rate: T.nilable(Float), @@ -17941,15 +18021,15 @@ module Orb name: String, plan_phase_order: T.nilable(Integer), price_type: - Orb::Price::ScalableMatrixWithTieredPricing::PriceType::OrSymbol, + Orb::Price::ScalableMatrixWithUnitPricing::PriceType::OrSymbol, replaces_price_id: T.nilable(String), - scalable_matrix_with_tiered_pricing_config: - Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash, + scalable_matrix_with_unit_pricing_config: + Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::OrHash, dimensional_price_configuration: T.nilable(Orb::DimensionalPriceConfiguration::OrHash), license_type: T.nilable( - Orb::Price::ScalableMatrixWithTieredPricing::LicenseType::OrHash + Orb::Price::ScalableMatrixWithUnitPricing::LicenseType::OrHash ), model_type: Symbol ).returns(T.attached_class) @@ -17989,15 +18069,15 @@ module Orb # The price id this price replaces. This price will take the place of the replaced # price in plan version migrations. replaces_price_id:, - # Configuration for scalable_matrix_with_tiered_pricing pricing - scalable_matrix_with_tiered_pricing_config:, + # Configuration for scalable_matrix_with_unit_pricing pricing + scalable_matrix_with_unit_pricing_config:, dimensional_price_configuration: nil, # The LicenseType resource represents a type of license that can be assigned to # users. License types are used during billing by grouping metrics on the # configured grouping key. license_type: nil, # The pricing model type - model_type: :scalable_matrix_with_tiered_pricing + model_type: :scalable_matrix_with_unit_pricing ) end @@ -18008,19 +18088,19 @@ module Orb billable_metric: T.nilable(Orb::BillableMetricTiny), billing_cycle_configuration: Orb::BillingCycleConfiguration, billing_mode: - Orb::Price::ScalableMatrixWithTieredPricing::BillingMode::TaggedSymbol, + Orb::Price::ScalableMatrixWithUnitPricing::BillingMode::TaggedSymbol, cadence: - Orb::Price::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol, + Orb::Price::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol, composite_price_filters: T.nilable( T::Array[ - Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter + Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter ] ), conversion_rate: T.nilable(Float), conversion_rate_config: T.nilable( - Orb::Price::ScalableMatrixWithTieredPricing::ConversionRateConfig::Variants + Orb::Price::ScalableMatrixWithUnitPricing::ConversionRateConfig::Variants ), created_at: Time, credit_allocation: T.nilable(Orb::Allocation), @@ -18041,15 +18121,15 @@ module Orb name: String, plan_phase_order: T.nilable(Integer), price_type: - Orb::Price::ScalableMatrixWithTieredPricing::PriceType::TaggedSymbol, + Orb::Price::ScalableMatrixWithUnitPricing::PriceType::TaggedSymbol, replaces_price_id: T.nilable(String), - scalable_matrix_with_tiered_pricing_config: - Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, + scalable_matrix_with_unit_pricing_config: + Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, dimensional_price_configuration: T.nilable(Orb::DimensionalPriceConfiguration), license_type: T.nilable( - Orb::Price::ScalableMatrixWithTieredPricing::LicenseType + Orb::Price::ScalableMatrixWithUnitPricing::LicenseType ) } ) @@ -18064,7 +18144,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::ScalableMatrixWithTieredPricing::BillingMode + Orb::Price::ScalableMatrixWithUnitPricing::BillingMode ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -18072,18 +18152,18 @@ module Orb IN_ADVANCE = T.let( :in_advance, - Orb::Price::ScalableMatrixWithTieredPricing::BillingMode::TaggedSymbol + Orb::Price::ScalableMatrixWithUnitPricing::BillingMode::TaggedSymbol ) IN_ARREAR = T.let( :in_arrear, - Orb::Price::ScalableMatrixWithTieredPricing::BillingMode::TaggedSymbol + Orb::Price::ScalableMatrixWithUnitPricing::BillingMode::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::ScalableMatrixWithTieredPricing::BillingMode::TaggedSymbol + Orb::Price::ScalableMatrixWithUnitPricing::BillingMode::TaggedSymbol ] ) end @@ -18096,48 +18176,45 @@ module Orb TaggedSymbol = T.type_alias do - T.all( - Symbol, - Orb::Price::ScalableMatrixWithTieredPricing::Cadence - ) + T.all(Symbol, Orb::Price::ScalableMatrixWithUnitPricing::Cadence) end OrSymbol = T.type_alias { T.any(Symbol, String) } ONE_TIME = T.let( :one_time, - Orb::Price::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol + Orb::Price::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Price::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol + Orb::Price::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Price::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol + Orb::Price::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Price::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol + Orb::Price::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol ) ANNUAL = T.let( :annual, - Orb::Price::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol + Orb::Price::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Price::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol + Orb::Price::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol + Orb::Price::ScalableMatrixWithUnitPricing::Cadence::TaggedSymbol ] ) end @@ -18149,7 +18226,7 @@ module Orb OrHash = T.type_alias do T.any( - Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter, + Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter, Orb::Internal::AnyHash ) end @@ -18157,7 +18234,7 @@ module Orb # The property of the price to filter on. sig do returns( - Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Field::TaggedSymbol ) end attr_accessor :field @@ -18165,7 +18242,7 @@ module Orb # Should prices that match the filter be included or excluded. sig do returns( - Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Operator::TaggedSymbol ) end attr_accessor :operator @@ -18177,9 +18254,9 @@ module Orb sig do params( field: - Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Field::OrSymbol, + Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Field::OrSymbol, operator: - Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Operator::OrSymbol, + Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Operator::OrSymbol, values: T::Array[String] ).returns(T.attached_class) end @@ -18197,9 +18274,9 @@ module Orb override.returns( { field: - Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Field::TaggedSymbol, + Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Field::TaggedSymbol, operator: - Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Operator::TaggedSymbol, + Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Operator::TaggedSymbol, values: T::Array[String] } ) @@ -18215,7 +18292,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Field + Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Field ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -18223,33 +18300,33 @@ module Orb PRICE_ID = T.let( :price_id, - Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Field::TaggedSymbol ) ITEM_ID = T.let( :item_id, - Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Field::TaggedSymbol ) PRICE_TYPE = T.let( :price_type, - Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Field::TaggedSymbol ) CURRENCY = T.let( :currency, - Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Field::TaggedSymbol ) PRICING_UNIT_ID = T.let( :pricing_unit_id, - Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Field::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Field::TaggedSymbol ] ) end @@ -18265,7 +18342,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Operator + Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Operator ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -18273,18 +18350,18 @@ module Orb INCLUDES = T.let( :includes, - Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Operator::TaggedSymbol ) EXCLUDES = T.let( :excludes, - Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Operator::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::Operator::TaggedSymbol ] ) end @@ -18300,7 +18377,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::ScalableMatrixWithTieredPricing::PriceType + Orb::Price::ScalableMatrixWithUnitPricing::PriceType ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -18308,23 +18385,23 @@ module Orb USAGE_PRICE = T.let( :usage_price, - Orb::Price::ScalableMatrixWithTieredPricing::PriceType::TaggedSymbol + Orb::Price::ScalableMatrixWithUnitPricing::PriceType::TaggedSymbol ) FIXED_PRICE = T.let( :fixed_price, - Orb::Price::ScalableMatrixWithTieredPricing::PriceType::TaggedSymbol + Orb::Price::ScalableMatrixWithUnitPricing::PriceType::TaggedSymbol ) COMPOSITE_PRICE = T.let( :composite_price, - Orb::Price::ScalableMatrixWithTieredPricing::PriceType::TaggedSymbol + Orb::Price::ScalableMatrixWithUnitPricing::PriceType::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::ScalableMatrixWithTieredPricing::PriceType::TaggedSymbol + Orb::Price::ScalableMatrixWithUnitPricing::PriceType::TaggedSymbol ] ) end @@ -18332,16 +18409,16 @@ module Orb end end - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel + class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, + Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, Orb::Internal::AnyHash ) end - # Used for the scalable matrix first dimension + # Used to determine the unit rate sig { returns(String) } attr_accessor :first_dimension @@ -18349,47 +18426,54 @@ module Orb sig do returns( T::Array[ - Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor + Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor ] ) end attr_accessor :matrix_scaling_factors - sig do - returns( - T::Array[ - Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier - ] - ) - end - attr_accessor :tiers + # The final unit price to rate against the output of the matrix + sig { returns(String) } + attr_accessor :unit_price - # Used for the scalable matrix second dimension (optional) + # 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_tiered_pricing pricing + # Configuration for scalable_matrix_with_unit_pricing pricing sig do params( first_dimension: String, matrix_scaling_factors: T::Array[ - Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor::OrHash - ], - tiers: - T::Array[ - Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier::OrHash + Orb::Price::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 for the scalable matrix first dimension + # Used to determine the unit rate first_dimension:, # Apply a scaling factor to each dimension matrix_scaling_factors:, - tiers:, - # Used for the scalable matrix second dimension (optional) + # 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 @@ -18400,12 +18484,11 @@ module Orb first_dimension: String, matrix_scaling_factors: T::Array[ - Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ], - tiers: - T::Array[ - Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier + Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor ], + unit_price: String, + grouping_key: T.nilable(String), + prorate: T.nilable(T::Boolean), second_dimension: T.nilable(String) } ) @@ -18417,7 +18500,7 @@ module Orb OrHash = T.type_alias do T.any( - Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor, + Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor, Orb::Internal::AnyHash ) end @@ -18458,46 +18541,13 @@ module Orb def to_hash end end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Price::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 class LicenseType < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Price::ScalableMatrixWithTieredPricing::LicenseType, + Orb::Price::ScalableMatrixWithUnitPricing::LicenseType, Orb::Internal::AnyHash ) end @@ -18542,10 +18592,13 @@ module Orb end end - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel + class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel OrHash = T.type_alias do - T.any(Orb::Price::CumulativeGroupedBulk, Orb::Internal::AnyHash) + T.any( + Orb::Price::ScalableMatrixWithTieredPricing, + Orb::Internal::AnyHash + ) end sig { returns(String) } @@ -18572,19 +18625,25 @@ module Orb attr_writer :billing_cycle_configuration sig do - returns(Orb::Price::CumulativeGroupedBulk::BillingMode::TaggedSymbol) + returns( + Orb::Price::ScalableMatrixWithTieredPricing::BillingMode::TaggedSymbol + ) end attr_accessor :billing_mode sig do - returns(Orb::Price::CumulativeGroupedBulk::Cadence::TaggedSymbol) + returns( + Orb::Price::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol + ) end attr_accessor :cadence sig do returns( T.nilable( - T::Array[Orb::Price::CumulativeGroupedBulk::CompositePriceFilter] + T::Array[ + Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter + ] ) ) end @@ -18596,7 +18655,7 @@ module Orb sig do returns( T.nilable( - Orb::Price::CumulativeGroupedBulk::ConversionRateConfig::Variants + Orb::Price::ScalableMatrixWithTieredPricing::ConversionRateConfig::Variants ) ) end @@ -18613,22 +18672,6 @@ module Orb end attr_writer :credit_allocation - # Configuration for cumulative_grouped_bulk pricing - sig do - returns( - Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig - ) - end - attr_reader :cumulative_grouped_bulk_config - - sig do - params( - cumulative_grouped_bulk_config: - Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_bulk_config - sig { returns(String) } attr_accessor :currency @@ -18699,7 +18742,9 @@ module Orb attr_accessor :plan_phase_order sig do - returns(Orb::Price::CumulativeGroupedBulk::PriceType::TaggedSymbol) + returns( + Orb::Price::ScalableMatrixWithTieredPricing::PriceType::TaggedSymbol + ) end attr_accessor :price_type @@ -18708,6 +18753,22 @@ module Orb sig { returns(T.nilable(String)) } attr_accessor :replaces_price_id + # Configuration for scalable_matrix_with_tiered_pricing pricing + sig do + returns( + Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig + ) + end + attr_reader :scalable_matrix_with_tiered_pricing_config + + sig do + params( + scalable_matrix_with_tiered_pricing_config: + Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash + ).void + end + attr_writer :scalable_matrix_with_tiered_pricing_config + sig { returns(T.nilable(Orb::DimensionalPriceConfiguration)) } attr_reader :dimensional_price_configuration @@ -18723,14 +18784,18 @@ module Orb # users. License types are used during billing by grouping metrics on the # configured grouping key. sig do - returns(T.nilable(Orb::Price::CumulativeGroupedBulk::LicenseType)) + returns( + T.nilable(Orb::Price::ScalableMatrixWithTieredPricing::LicenseType) + ) end attr_reader :license_type sig do params( license_type: - T.nilable(Orb::Price::CumulativeGroupedBulk::LicenseType::OrHash) + T.nilable( + Orb::Price::ScalableMatrixWithTieredPricing::LicenseType::OrHash + ) ).void end attr_writer :license_type @@ -18741,12 +18806,13 @@ module Orb billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash), billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash, billing_mode: - Orb::Price::CumulativeGroupedBulk::BillingMode::OrSymbol, - cadence: Orb::Price::CumulativeGroupedBulk::Cadence::OrSymbol, + Orb::Price::ScalableMatrixWithTieredPricing::BillingMode::OrSymbol, + cadence: + Orb::Price::ScalableMatrixWithTieredPricing::Cadence::OrSymbol, composite_price_filters: T.nilable( T::Array[ - Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::OrHash + Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::OrHash ] ), conversion_rate: T.nilable(Float), @@ -18759,8 +18825,6 @@ module Orb ), created_at: Time, credit_allocation: T.nilable(Orb::Allocation::OrHash), - cumulative_grouped_bulk_config: - Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash, currency: String, discount: T.nilable( @@ -18784,12 +18848,17 @@ module Orb minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), - price_type: Orb::Price::CumulativeGroupedBulk::PriceType::OrSymbol, + price_type: + Orb::Price::ScalableMatrixWithTieredPricing::PriceType::OrSymbol, replaces_price_id: T.nilable(String), + scalable_matrix_with_tiered_pricing_config: + Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::OrHash, dimensional_price_configuration: T.nilable(Orb::DimensionalPriceConfiguration::OrHash), license_type: - T.nilable(Orb::Price::CumulativeGroupedBulk::LicenseType::OrHash), + T.nilable( + Orb::Price::ScalableMatrixWithTieredPricing::LicenseType::OrHash + ), model_type: Symbol ).returns(T.attached_class) end @@ -18804,8 +18873,6 @@ module Orb conversion_rate_config:, created_at:, credit_allocation:, - # Configuration for cumulative_grouped_bulk pricing - cumulative_grouped_bulk_config:, currency:, discount:, external_price_id:, @@ -18830,13 +18897,15 @@ module Orb # The price id this price replaces. This price will take the place of the replaced # price in plan version migrations. replaces_price_id:, + # Configuration for scalable_matrix_with_tiered_pricing pricing + scalable_matrix_with_tiered_pricing_config:, dimensional_price_configuration: nil, # The LicenseType resource represents a type of license that can be assigned to # users. License types are used during billing by grouping metrics on the # configured grouping key. license_type: nil, # The pricing model type - model_type: :cumulative_grouped_bulk + model_type: :scalable_matrix_with_tiered_pricing ) end @@ -18847,24 +18916,2377 @@ module Orb billable_metric: T.nilable(Orb::BillableMetricTiny), billing_cycle_configuration: Orb::BillingCycleConfiguration, billing_mode: - Orb::Price::CumulativeGroupedBulk::BillingMode::TaggedSymbol, - cadence: Orb::Price::CumulativeGroupedBulk::Cadence::TaggedSymbol, + Orb::Price::ScalableMatrixWithTieredPricing::BillingMode::TaggedSymbol, + cadence: + Orb::Price::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol, + composite_price_filters: + T.nilable( + T::Array[ + Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter + ] + ), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + Orb::Price::ScalableMatrixWithTieredPricing::ConversionRateConfig::Variants + ), + created_at: Time, + credit_allocation: T.nilable(Orb::Allocation), + currency: String, + discount: T.nilable(Orb::Discount::Variants), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::BillingCycleConfiguration), + item: Orb::ItemSlim, + maximum: T.nilable(Orb::Maximum), + maximum_amount: T.nilable(String), + metadata: T::Hash[Symbol, String], + minimum: T.nilable(Orb::Minimum), + minimum_amount: T.nilable(String), + model_type: Symbol, + name: String, + plan_phase_order: T.nilable(Integer), + price_type: + Orb::Price::ScalableMatrixWithTieredPricing::PriceType::TaggedSymbol, + replaces_price_id: T.nilable(String), + scalable_matrix_with_tiered_pricing_config: + Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, + dimensional_price_configuration: + T.nilable(Orb::DimensionalPriceConfiguration), + license_type: + T.nilable( + Orb::Price::ScalableMatrixWithTieredPricing::LicenseType + ) + } + ) + end + def to_hash + end + + module BillingMode + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Price::ScalableMatrixWithTieredPricing::BillingMode + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + IN_ADVANCE = + T.let( + :in_advance, + Orb::Price::ScalableMatrixWithTieredPricing::BillingMode::TaggedSymbol + ) + IN_ARREAR = + T.let( + :in_arrear, + Orb::Price::ScalableMatrixWithTieredPricing::BillingMode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::ScalableMatrixWithTieredPricing::BillingMode::TaggedSymbol + ] + ) + end + def self.values + end + end + + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Price::ScalableMatrixWithTieredPricing::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ONE_TIME = + T.let( + :one_time, + Orb::Price::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::Price::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::Price::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Price::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol + ) + ANNUAL = + T.let( + :annual, + Orb::Price::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::Price::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::ScalableMatrixWithTieredPricing::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class CompositePriceFilter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter, + Orb::Internal::AnyHash + ) + end + + # The property of the price to filter on. + sig do + returns( + Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Field::TaggedSymbol + ) + end + attr_accessor :field + + # Should prices that match the filter be included or excluded. + sig do + returns( + Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Operator::TaggedSymbol + ) + end + attr_accessor :operator + + # The IDs or values that match this filter. + sig { returns(T::Array[String]) } + attr_accessor :values + + sig do + params( + field: + Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Field::OrSymbol, + operator: + Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Operator::OrSymbol, + values: T::Array[String] + ).returns(T.attached_class) + end + def self.new( + # The property of the price to filter on. + field:, + # Should prices that match the filter be included or excluded. + operator:, + # The IDs or values that match this filter. + values: + ) + end + + sig do + override.returns( + { + field: + Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Field::TaggedSymbol, + operator: + Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Operator::TaggedSymbol, + values: T::Array[String] + } + ) + end + def to_hash + end + + # The property of the price to filter on. + module Field + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Field + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PRICE_ID = + T.let( + :price_id, + Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Field::TaggedSymbol + ) + ITEM_ID = + T.let( + :item_id, + Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Field::TaggedSymbol + ) + PRICE_TYPE = + T.let( + :price_type, + Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Field::TaggedSymbol + ) + CURRENCY = + T.let( + :currency, + Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Field::TaggedSymbol + ) + PRICING_UNIT_ID = + T.let( + :pricing_unit_id, + Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Field::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Field::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Should prices that match the filter be included or excluded. + module Operator + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Operator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + INCLUDES = + T.let( + :includes, + Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Operator::TaggedSymbol + ) + EXCLUDES = + T.let( + :excludes, + Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Operator::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::Operator::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + module PriceType + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Price::ScalableMatrixWithTieredPricing::PriceType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + USAGE_PRICE = + T.let( + :usage_price, + Orb::Price::ScalableMatrixWithTieredPricing::PriceType::TaggedSymbol + ) + FIXED_PRICE = + T.let( + :fixed_price, + Orb::Price::ScalableMatrixWithTieredPricing::PriceType::TaggedSymbol + ) + COMPOSITE_PRICE = + T.let( + :composite_price, + Orb::Price::ScalableMatrixWithTieredPricing::PriceType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::ScalableMatrixWithTieredPricing::PriceType::TaggedSymbol + ] + ) + end + def self.values + end + end + + class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::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::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor + ] + ) + end + attr_accessor :matrix_scaling_factors + + sig do + returns( + T::Array[ + Orb::Price::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::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor::OrHash + ], + tiers: + T::Array[ + Orb::Price::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::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor + ], + tiers: + T::Array[ + Orb::Price::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::Price::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::Price::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 + + class LicenseType < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::ScalableMatrixWithTieredPricing::LicenseType, + Orb::Internal::AnyHash + ) + end + + # The Orb-assigned unique identifier for the license type. + sig { returns(String) } + attr_accessor :id + + # The key used for grouping licenses of this type. This is typically a user + # identifier field. + sig { returns(String) } + attr_accessor :grouping_key + + # The name of the license type. + sig { returns(String) } + attr_accessor :name + + # The LicenseType resource represents a type of license that can be assigned to + # users. License types are used during billing by grouping metrics on the + # configured grouping key. + sig do + params(id: String, grouping_key: String, name: String).returns( + T.attached_class + ) + end + def self.new( + # The Orb-assigned unique identifier for the license type. + id:, + # The key used for grouping licenses of this type. This is typically a user + # identifier field. + grouping_key:, + # The name of the license type. + name: + ) + end + + sig do + override.returns({ id: String, grouping_key: String, name: String }) + end + def to_hash + end + end + end + + class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(Orb::Price::CumulativeGroupedBulk, Orb::Internal::AnyHash) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(T.nilable(Orb::BillableMetricTiny)) } + attr_reader :billable_metric + + sig do + params( + billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash) + ).void + end + attr_writer :billable_metric + + sig { returns(Orb::BillingCycleConfiguration) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash + ).void + end + attr_writer :billing_cycle_configuration + + sig do + returns(Orb::Price::CumulativeGroupedBulk::BillingMode::TaggedSymbol) + end + attr_accessor :billing_mode + + sig do + returns(Orb::Price::CumulativeGroupedBulk::Cadence::TaggedSymbol) + end + attr_accessor :cadence + + sig do + returns( + T.nilable( + T::Array[Orb::Price::CumulativeGroupedBulk::CompositePriceFilter] + ) + ) + end + attr_accessor :composite_price_filters + + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + sig do + returns( + T.nilable( + Orb::Price::CumulativeGroupedBulk::ConversionRateConfig::Variants + ) + ) + end + attr_accessor :conversion_rate_config + + sig { returns(Time) } + attr_accessor :created_at + + sig { returns(T.nilable(Orb::Allocation)) } + attr_reader :credit_allocation + + sig do + params(credit_allocation: T.nilable(Orb::Allocation::OrHash)).void + end + attr_writer :credit_allocation + + # Configuration for cumulative_grouped_bulk pricing + sig do + returns( + Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig + ) + end + attr_reader :cumulative_grouped_bulk_config + + sig do + params( + cumulative_grouped_bulk_config: + Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash + ).void + end + attr_writer :cumulative_grouped_bulk_config + + sig { returns(String) } + attr_accessor :currency + + sig { returns(T.nilable(Orb::Discount::Variants)) } + attr_accessor :discount + + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + sig { returns(T.nilable(Orb::BillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::BillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # A minimal representation of an Item containing only the essential identifying + # information. + sig { returns(Orb::ItemSlim) } + attr_reader :item + + sig { params(item: Orb::ItemSlim::OrHash).void } + attr_writer :item + + sig { returns(T.nilable(Orb::Maximum)) } + attr_reader :maximum + + sig { params(maximum: T.nilable(Orb::Maximum::OrHash)).void } + attr_writer :maximum + + sig { returns(T.nilable(String)) } + attr_accessor :maximum_amount + + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + sig { returns(T::Hash[Symbol, String]) } + attr_accessor :metadata + + sig { returns(T.nilable(Orb::Minimum)) } + attr_reader :minimum + + sig { params(minimum: T.nilable(Orb::Minimum::OrHash)).void } + attr_writer :minimum + + sig { returns(T.nilable(String)) } + attr_accessor :minimum_amount + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + sig { returns(String) } + attr_accessor :name + + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order + + sig do + returns(Orb::Price::CumulativeGroupedBulk::PriceType::TaggedSymbol) + end + attr_accessor :price_type + + # The price id this price replaces. This price will take the place of the replaced + # price in plan version migrations. + sig { returns(T.nilable(String)) } + attr_accessor :replaces_price_id + + sig { returns(T.nilable(Orb::DimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::DimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # The LicenseType resource represents a type of license that can be assigned to + # users. License types are used during billing by grouping metrics on the + # configured grouping key. + sig do + returns(T.nilable(Orb::Price::CumulativeGroupedBulk::LicenseType)) + end + attr_reader :license_type + + sig do + params( + license_type: + T.nilable(Orb::Price::CumulativeGroupedBulk::LicenseType::OrHash) + ).void + end + attr_writer :license_type + + sig do + params( + id: String, + billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash), + billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash, + billing_mode: + Orb::Price::CumulativeGroupedBulk::BillingMode::OrSymbol, + cadence: Orb::Price::CumulativeGroupedBulk::Cadence::OrSymbol, + composite_price_filters: + T.nilable( + T::Array[ + Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::OrHash + ] + ), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + created_at: Time, + credit_allocation: T.nilable(Orb::Allocation::OrHash), + cumulative_grouped_bulk_config: + Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::OrHash, + currency: String, + discount: + T.nilable( + T.any( + Orb::PercentageDiscount::OrHash, + Orb::TrialDiscount::OrHash, + Orb::UsageDiscount::OrHash, + Orb::AmountDiscount::OrHash + ) + ), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::BillingCycleConfiguration::OrHash), + item: Orb::ItemSlim::OrHash, + maximum: T.nilable(Orb::Maximum::OrHash), + maximum_amount: T.nilable(String), + metadata: T::Hash[Symbol, String], + minimum: T.nilable(Orb::Minimum::OrHash), + minimum_amount: T.nilable(String), + name: String, + plan_phase_order: T.nilable(Integer), + price_type: Orb::Price::CumulativeGroupedBulk::PriceType::OrSymbol, + replaces_price_id: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::DimensionalPriceConfiguration::OrHash), + license_type: + T.nilable(Orb::Price::CumulativeGroupedBulk::LicenseType::OrHash), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + id:, + billable_metric:, + billing_cycle_configuration:, + billing_mode:, + cadence:, + composite_price_filters:, + conversion_rate:, + conversion_rate_config:, + created_at:, + credit_allocation:, + # Configuration for cumulative_grouped_bulk pricing + cumulative_grouped_bulk_config:, + currency:, + discount:, + external_price_id:, + fixed_price_quantity:, + invoice_grouping_key:, + invoicing_cycle_configuration:, + # A minimal representation of an Item containing only the essential identifying + # information. + item:, + maximum:, + maximum_amount:, + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + metadata:, + minimum:, + minimum_amount:, + name:, + plan_phase_order:, + price_type:, + # The price id this price replaces. This price will take the place of the replaced + # price in plan version migrations. + replaces_price_id:, + dimensional_price_configuration: nil, + # The LicenseType resource represents a type of license that can be assigned to + # users. License types are used during billing by grouping metrics on the + # configured grouping key. + license_type: nil, + # The pricing model type + model_type: :cumulative_grouped_bulk + ) + end + + sig do + override.returns( + { + id: String, + billable_metric: T.nilable(Orb::BillableMetricTiny), + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: + Orb::Price::CumulativeGroupedBulk::BillingMode::TaggedSymbol, + cadence: Orb::Price::CumulativeGroupedBulk::Cadence::TaggedSymbol, + composite_price_filters: + T.nilable( + T::Array[ + Orb::Price::CumulativeGroupedBulk::CompositePriceFilter + ] + ), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + Orb::Price::CumulativeGroupedBulk::ConversionRateConfig::Variants + ), + created_at: Time, + credit_allocation: T.nilable(Orb::Allocation), + cumulative_grouped_bulk_config: + Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, + currency: String, + discount: T.nilable(Orb::Discount::Variants), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::BillingCycleConfiguration), + item: Orb::ItemSlim, + maximum: T.nilable(Orb::Maximum), + maximum_amount: T.nilable(String), + metadata: T::Hash[Symbol, String], + minimum: T.nilable(Orb::Minimum), + minimum_amount: T.nilable(String), + model_type: Symbol, + name: String, + plan_phase_order: T.nilable(Integer), + price_type: + Orb::Price::CumulativeGroupedBulk::PriceType::TaggedSymbol, + replaces_price_id: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::DimensionalPriceConfiguration), + license_type: + T.nilable(Orb::Price::CumulativeGroupedBulk::LicenseType) + } + ) + end + def to_hash + end + + module BillingMode + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::Price::CumulativeGroupedBulk::BillingMode) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + IN_ADVANCE = + T.let( + :in_advance, + Orb::Price::CumulativeGroupedBulk::BillingMode::TaggedSymbol + ) + IN_ARREAR = + T.let( + :in_arrear, + Orb::Price::CumulativeGroupedBulk::BillingMode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::CumulativeGroupedBulk::BillingMode::TaggedSymbol + ] + ) + end + def self.values + end + end + + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::Price::CumulativeGroupedBulk::Cadence) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ONE_TIME = + T.let( + :one_time, + Orb::Price::CumulativeGroupedBulk::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::Price::CumulativeGroupedBulk::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::Price::CumulativeGroupedBulk::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Price::CumulativeGroupedBulk::Cadence::TaggedSymbol + ) + ANNUAL = + T.let( + :annual, + Orb::Price::CumulativeGroupedBulk::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::Price::CumulativeGroupedBulk::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[Orb::Price::CumulativeGroupedBulk::Cadence::TaggedSymbol] + ) + end + def self.values + end + end + + class CompositePriceFilter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::CumulativeGroupedBulk::CompositePriceFilter, + Orb::Internal::AnyHash + ) + end + + # The property of the price to filter on. + sig do + returns( + Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Field::TaggedSymbol + ) + end + attr_accessor :field + + # Should prices that match the filter be included or excluded. + sig do + returns( + Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Operator::TaggedSymbol + ) + end + attr_accessor :operator + + # The IDs or values that match this filter. + sig { returns(T::Array[String]) } + attr_accessor :values + + sig do + params( + field: + Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Field::OrSymbol, + operator: + Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Operator::OrSymbol, + values: T::Array[String] + ).returns(T.attached_class) + end + def self.new( + # The property of the price to filter on. + field:, + # Should prices that match the filter be included or excluded. + operator:, + # The IDs or values that match this filter. + values: + ) + end + + sig do + override.returns( + { + field: + Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Field::TaggedSymbol, + operator: + Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Operator::TaggedSymbol, + values: T::Array[String] + } + ) + end + def to_hash + end + + # The property of the price to filter on. + module Field + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Field + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PRICE_ID = + T.let( + :price_id, + Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Field::TaggedSymbol + ) + ITEM_ID = + T.let( + :item_id, + Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Field::TaggedSymbol + ) + PRICE_TYPE = + T.let( + :price_type, + Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Field::TaggedSymbol + ) + CURRENCY = + T.let( + :currency, + Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Field::TaggedSymbol + ) + PRICING_UNIT_ID = + T.let( + :pricing_unit_id, + Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Field::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Field::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Should prices that match the filter be included or excluded. + module Operator + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Operator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + INCLUDES = + T.let( + :includes, + Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Operator::TaggedSymbol + ) + EXCLUDES = + T.let( + :excludes, + Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Operator::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Operator::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, + Orb::Internal::AnyHash + ) + end + + # Each tier lower bound must have the same group of values. + sig do + returns( + T::Array[ + Orb::Price::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::Price::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::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue + ], + group: String + } + ) + end + def to_hash + end + + class DimensionValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::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 + + module PriceType + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::Price::CumulativeGroupedBulk::PriceType) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + USAGE_PRICE = + T.let( + :usage_price, + Orb::Price::CumulativeGroupedBulk::PriceType::TaggedSymbol + ) + FIXED_PRICE = + T.let( + :fixed_price, + Orb::Price::CumulativeGroupedBulk::PriceType::TaggedSymbol + ) + COMPOSITE_PRICE = + T.let( + :composite_price, + Orb::Price::CumulativeGroupedBulk::PriceType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::CumulativeGroupedBulk::PriceType::TaggedSymbol + ] + ) + end + def self.values + end + end + + class LicenseType < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::CumulativeGroupedBulk::LicenseType, + Orb::Internal::AnyHash + ) + end + + # The Orb-assigned unique identifier for the license type. + sig { returns(String) } + attr_accessor :id + + # The key used for grouping licenses of this type. This is typically a user + # identifier field. + sig { returns(String) } + attr_accessor :grouping_key + + # The name of the license type. + sig { returns(String) } + attr_accessor :name + + # The LicenseType resource represents a type of license that can be assigned to + # users. License types are used during billing by grouping metrics on the + # configured grouping key. + sig do + params(id: String, grouping_key: String, name: String).returns( + T.attached_class + ) + end + def self.new( + # The Orb-assigned unique identifier for the license type. + id:, + # The key used for grouping licenses of this type. This is typically a user + # identifier field. + grouping_key:, + # The name of the license type. + name: + ) + end + + sig do + override.returns({ id: String, grouping_key: String, name: String }) + end + def to_hash + end + end + end + + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::CumulativeGroupedAllocation, + Orb::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(T.nilable(Orb::BillableMetricTiny)) } + attr_reader :billable_metric + + sig do + params( + billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash) + ).void + end + attr_writer :billable_metric + + sig { returns(Orb::BillingCycleConfiguration) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash + ).void + end + attr_writer :billing_cycle_configuration + + sig do + returns( + Orb::Price::CumulativeGroupedAllocation::BillingMode::TaggedSymbol + ) + end + attr_accessor :billing_mode + + sig do + returns( + Orb::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + end + attr_accessor :cadence + + sig do + returns( + T.nilable( + T::Array[ + Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter + ] + ) + ) + end + attr_accessor :composite_price_filters + + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + sig do + returns( + T.nilable( + Orb::Price::CumulativeGroupedAllocation::ConversionRateConfig::Variants + ) + ) + end + attr_accessor :conversion_rate_config + + sig { returns(Time) } + attr_accessor :created_at + + sig { returns(T.nilable(Orb::Allocation)) } + attr_reader :credit_allocation + + sig do + params(credit_allocation: T.nilable(Orb::Allocation::OrHash)).void + end + attr_writer :credit_allocation + + # Configuration for cumulative_grouped_allocation pricing + sig do + returns( + Orb::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + ) + end + attr_reader :cumulative_grouped_allocation_config + + sig do + params( + cumulative_grouped_allocation_config: + Orb::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + ).void + end + attr_writer :cumulative_grouped_allocation_config + + sig { returns(String) } + attr_accessor :currency + + sig { returns(T.nilable(Orb::Discount::Variants)) } + attr_accessor :discount + + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + sig { returns(T.nilable(Orb::BillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::BillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # A minimal representation of an Item containing only the essential identifying + # information. + sig { returns(Orb::ItemSlim) } + attr_reader :item + + sig { params(item: Orb::ItemSlim::OrHash).void } + attr_writer :item + + sig { returns(T.nilable(Orb::Maximum)) } + attr_reader :maximum + + sig { params(maximum: T.nilable(Orb::Maximum::OrHash)).void } + attr_writer :maximum + + sig { returns(T.nilable(String)) } + attr_accessor :maximum_amount + + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + sig { returns(T::Hash[Symbol, String]) } + attr_accessor :metadata + + sig { returns(T.nilable(Orb::Minimum)) } + attr_reader :minimum + + sig { params(minimum: T.nilable(Orb::Minimum::OrHash)).void } + attr_writer :minimum + + sig { returns(T.nilable(String)) } + attr_accessor :minimum_amount + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + sig { returns(String) } + attr_accessor :name + + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order + + sig do + returns( + Orb::Price::CumulativeGroupedAllocation::PriceType::TaggedSymbol + ) + end + attr_accessor :price_type + + # The price id this price replaces. This price will take the place of the replaced + # price in plan version migrations. + sig { returns(T.nilable(String)) } + attr_accessor :replaces_price_id + + sig { returns(T.nilable(Orb::DimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::DimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # The LicenseType resource represents a type of license that can be assigned to + # users. License types are used during billing by grouping metrics on the + # configured grouping key. + sig do + returns( + T.nilable(Orb::Price::CumulativeGroupedAllocation::LicenseType) + ) + end + attr_reader :license_type + + sig do + params( + license_type: + T.nilable( + Orb::Price::CumulativeGroupedAllocation::LicenseType::OrHash + ) + ).void + end + attr_writer :license_type + + sig do + params( + id: String, + billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash), + billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash, + billing_mode: + Orb::Price::CumulativeGroupedAllocation::BillingMode::OrSymbol, + cadence: Orb::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + composite_price_filters: + T.nilable( + T::Array[ + Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::OrHash + ] + ), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + created_at: Time, + credit_allocation: T.nilable(Orb::Allocation::OrHash), + cumulative_grouped_allocation_config: + Orb::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, + currency: String, + discount: + T.nilable( + T.any( + Orb::PercentageDiscount::OrHash, + Orb::TrialDiscount::OrHash, + Orb::UsageDiscount::OrHash, + Orb::AmountDiscount::OrHash + ) + ), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::BillingCycleConfiguration::OrHash), + item: Orb::ItemSlim::OrHash, + maximum: T.nilable(Orb::Maximum::OrHash), + maximum_amount: T.nilable(String), + metadata: T::Hash[Symbol, String], + minimum: T.nilable(Orb::Minimum::OrHash), + minimum_amount: T.nilable(String), + name: String, + plan_phase_order: T.nilable(Integer), + price_type: + Orb::Price::CumulativeGroupedAllocation::PriceType::OrSymbol, + replaces_price_id: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::DimensionalPriceConfiguration::OrHash), + license_type: + T.nilable( + Orb::Price::CumulativeGroupedAllocation::LicenseType::OrHash + ), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + id:, + billable_metric:, + billing_cycle_configuration:, + billing_mode:, + cadence:, + composite_price_filters:, + conversion_rate:, + conversion_rate_config:, + created_at:, + credit_allocation:, + # Configuration for cumulative_grouped_allocation pricing + cumulative_grouped_allocation_config:, + currency:, + discount:, + external_price_id:, + fixed_price_quantity:, + invoice_grouping_key:, + invoicing_cycle_configuration:, + # A minimal representation of an Item containing only the essential identifying + # information. + item:, + maximum:, + maximum_amount:, + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + metadata:, + minimum:, + minimum_amount:, + name:, + plan_phase_order:, + price_type:, + # The price id this price replaces. This price will take the place of the replaced + # price in plan version migrations. + replaces_price_id:, + dimensional_price_configuration: nil, + # The LicenseType resource represents a type of license that can be assigned to + # users. License types are used during billing by grouping metrics on the + # configured grouping key. + license_type: nil, + # The pricing model type + model_type: :cumulative_grouped_allocation + ) + end + + sig do + override.returns( + { + id: String, + billable_metric: T.nilable(Orb::BillableMetricTiny), + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: + Orb::Price::CumulativeGroupedAllocation::BillingMode::TaggedSymbol, + cadence: + Orb::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol, + composite_price_filters: + T.nilable( + T::Array[ + Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter + ] + ), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + Orb::Price::CumulativeGroupedAllocation::ConversionRateConfig::Variants + ), + created_at: Time, + credit_allocation: T.nilable(Orb::Allocation), + cumulative_grouped_allocation_config: + Orb::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + currency: String, + discount: T.nilable(Orb::Discount::Variants), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::BillingCycleConfiguration), + item: Orb::ItemSlim, + maximum: T.nilable(Orb::Maximum), + maximum_amount: T.nilable(String), + metadata: T::Hash[Symbol, String], + minimum: T.nilable(Orb::Minimum), + minimum_amount: T.nilable(String), + model_type: Symbol, + name: String, + plan_phase_order: T.nilable(Integer), + price_type: + Orb::Price::CumulativeGroupedAllocation::PriceType::TaggedSymbol, + replaces_price_id: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::DimensionalPriceConfiguration), + license_type: + T.nilable(Orb::Price::CumulativeGroupedAllocation::LicenseType) + } + ) + end + def to_hash + end + + module BillingMode + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Price::CumulativeGroupedAllocation::BillingMode + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + IN_ADVANCE = + T.let( + :in_advance, + Orb::Price::CumulativeGroupedAllocation::BillingMode::TaggedSymbol + ) + IN_ARREAR = + T.let( + :in_arrear, + Orb::Price::CumulativeGroupedAllocation::BillingMode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::CumulativeGroupedAllocation::BillingMode::TaggedSymbol + ] + ) + end + def self.values + end + end + + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::Price::CumulativeGroupedAllocation::Cadence) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ONE_TIME = + T.let( + :one_time, + Orb::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + ANNUAL = + T.let( + :annual, + Orb::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class CompositePriceFilter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter, + Orb::Internal::AnyHash + ) + end + + # The property of the price to filter on. + sig do + returns( + Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Field::TaggedSymbol + ) + end + attr_accessor :field + + # Should prices that match the filter be included or excluded. + sig do + returns( + Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Operator::TaggedSymbol + ) + end + attr_accessor :operator + + # The IDs or values that match this filter. + sig { returns(T::Array[String]) } + attr_accessor :values + + sig do + params( + field: + Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Field::OrSymbol, + operator: + Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Operator::OrSymbol, + values: T::Array[String] + ).returns(T.attached_class) + end + def self.new( + # The property of the price to filter on. + field:, + # Should prices that match the filter be included or excluded. + operator:, + # The IDs or values that match this filter. + values: + ) + end + + sig do + override.returns( + { + field: + Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Field::TaggedSymbol, + operator: + Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Operator::TaggedSymbol, + values: T::Array[String] + } + ) + end + def to_hash + end + + # The property of the price to filter on. + module Field + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Field + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PRICE_ID = + T.let( + :price_id, + Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Field::TaggedSymbol + ) + ITEM_ID = + T.let( + :item_id, + Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Field::TaggedSymbol + ) + PRICE_TYPE = + T.let( + :price_type, + Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Field::TaggedSymbol + ) + CURRENCY = + T.let( + :currency, + Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Field::TaggedSymbol + ) + PRICING_UNIT_ID = + T.let( + :pricing_unit_id, + Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Field::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Field::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Should prices that match the filter be included or excluded. + module Operator + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Operator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + INCLUDES = + T.let( + :includes, + Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Operator::TaggedSymbol + ) + EXCLUDES = + T.let( + :excludes, + Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Operator::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Operator::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::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 + + module PriceType + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::Price::CumulativeGroupedAllocation::PriceType) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + USAGE_PRICE = + T.let( + :usage_price, + Orb::Price::CumulativeGroupedAllocation::PriceType::TaggedSymbol + ) + FIXED_PRICE = + T.let( + :fixed_price, + Orb::Price::CumulativeGroupedAllocation::PriceType::TaggedSymbol + ) + COMPOSITE_PRICE = + T.let( + :composite_price, + Orb::Price::CumulativeGroupedAllocation::PriceType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Price::CumulativeGroupedAllocation::PriceType::TaggedSymbol + ] + ) + end + def self.values + end + end + + class LicenseType < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Price::CumulativeGroupedAllocation::LicenseType, + Orb::Internal::AnyHash + ) + end + + # The Orb-assigned unique identifier for the license type. + sig { returns(String) } + attr_accessor :id + + # The key used for grouping licenses of this type. This is typically a user + # identifier field. + sig { returns(String) } + attr_accessor :grouping_key + + # The name of the license type. + sig { returns(String) } + attr_accessor :name + + # The LicenseType resource represents a type of license that can be assigned to + # users. License types are used during billing by grouping metrics on the + # configured grouping key. + sig do + params(id: String, grouping_key: String, name: String).returns( + T.attached_class + ) + end + def self.new( + # The Orb-assigned unique identifier for the license type. + id:, + # The key used for grouping licenses of this type. This is typically a user + # identifier field. + grouping_key:, + # The name of the license type. + name: + ) + end + + sig do + override.returns({ id: String, grouping_key: String, name: String }) + end + def to_hash + end + end + end + + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(Orb::Price::DailyCreditAllowance, Orb::Internal::AnyHash) + end + + sig { returns(String) } + attr_accessor :id + + sig { returns(T.nilable(Orb::BillableMetricTiny)) } + attr_reader :billable_metric + + sig do + params( + billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash) + ).void + end + attr_writer :billable_metric + + sig { returns(Orb::BillingCycleConfiguration) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash + ).void + end + attr_writer :billing_cycle_configuration + + sig do + returns(Orb::Price::DailyCreditAllowance::BillingMode::TaggedSymbol) + end + attr_accessor :billing_mode + + sig { returns(Orb::Price::DailyCreditAllowance::Cadence::TaggedSymbol) } + attr_accessor :cadence + + sig do + returns( + T.nilable( + T::Array[Orb::Price::DailyCreditAllowance::CompositePriceFilter] + ) + ) + end + attr_accessor :composite_price_filters + + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + sig do + returns( + T.nilable( + Orb::Price::DailyCreditAllowance::ConversionRateConfig::Variants + ) + ) + end + attr_accessor :conversion_rate_config + + sig { returns(Time) } + attr_accessor :created_at + + sig { returns(T.nilable(Orb::Allocation)) } + attr_reader :credit_allocation + + sig do + params(credit_allocation: T.nilable(Orb::Allocation::OrHash)).void + end + attr_writer :credit_allocation + + sig { returns(String) } + attr_accessor :currency + + # Configuration for daily_credit_allowance pricing + sig do + returns(Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig) + end + attr_reader :daily_credit_allowance_config + + sig do + params( + daily_credit_allowance_config: + Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash + ).void + end + attr_writer :daily_credit_allowance_config + + sig { returns(T.nilable(Orb::Discount::Variants)) } + attr_accessor :discount + + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + sig { returns(T.nilable(Orb::BillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::BillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # A minimal representation of an Item containing only the essential identifying + # information. + sig { returns(Orb::ItemSlim) } + attr_reader :item + + sig { params(item: Orb::ItemSlim::OrHash).void } + attr_writer :item + + sig { returns(T.nilable(Orb::Maximum)) } + attr_reader :maximum + + sig { params(maximum: T.nilable(Orb::Maximum::OrHash)).void } + attr_writer :maximum + + sig { returns(T.nilable(String)) } + attr_accessor :maximum_amount + + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + sig { returns(T::Hash[Symbol, String]) } + attr_accessor :metadata + + sig { returns(T.nilable(Orb::Minimum)) } + attr_reader :minimum + + sig { params(minimum: T.nilable(Orb::Minimum::OrHash)).void } + attr_writer :minimum + + sig { returns(T.nilable(String)) } + attr_accessor :minimum_amount + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + sig { returns(String) } + attr_accessor :name + + sig { returns(T.nilable(Integer)) } + attr_accessor :plan_phase_order + + sig do + returns(Orb::Price::DailyCreditAllowance::PriceType::TaggedSymbol) + end + attr_accessor :price_type + + # The price id this price replaces. This price will take the place of the replaced + # price in plan version migrations. + sig { returns(T.nilable(String)) } + attr_accessor :replaces_price_id + + sig { returns(T.nilable(Orb::DimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::DimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # The LicenseType resource represents a type of license that can be assigned to + # users. License types are used during billing by grouping metrics on the + # configured grouping key. + sig do + returns(T.nilable(Orb::Price::DailyCreditAllowance::LicenseType)) + end + attr_reader :license_type + + sig do + params( + license_type: + T.nilable(Orb::Price::DailyCreditAllowance::LicenseType::OrHash) + ).void + end + attr_writer :license_type + + sig do + params( + id: String, + billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash), + billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash, + billing_mode: + Orb::Price::DailyCreditAllowance::BillingMode::OrSymbol, + cadence: Orb::Price::DailyCreditAllowance::Cadence::OrSymbol, + composite_price_filters: + T.nilable( + T::Array[ + Orb::Price::DailyCreditAllowance::CompositePriceFilter::OrHash + ] + ), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + created_at: Time, + credit_allocation: T.nilable(Orb::Allocation::OrHash), + currency: String, + daily_credit_allowance_config: + Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, + discount: + T.nilable( + T.any( + Orb::PercentageDiscount::OrHash, + Orb::TrialDiscount::OrHash, + Orb::UsageDiscount::OrHash, + Orb::AmountDiscount::OrHash + ) + ), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::BillingCycleConfiguration::OrHash), + item: Orb::ItemSlim::OrHash, + maximum: T.nilable(Orb::Maximum::OrHash), + maximum_amount: T.nilable(String), + metadata: T::Hash[Symbol, String], + minimum: T.nilable(Orb::Minimum::OrHash), + minimum_amount: T.nilable(String), + name: String, + plan_phase_order: T.nilable(Integer), + price_type: Orb::Price::DailyCreditAllowance::PriceType::OrSymbol, + replaces_price_id: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::DimensionalPriceConfiguration::OrHash), + license_type: + T.nilable(Orb::Price::DailyCreditAllowance::LicenseType::OrHash), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + id:, + billable_metric:, + billing_cycle_configuration:, + billing_mode:, + cadence:, + composite_price_filters:, + conversion_rate:, + conversion_rate_config:, + created_at:, + credit_allocation:, + currency:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, + discount:, + external_price_id:, + fixed_price_quantity:, + invoice_grouping_key:, + invoicing_cycle_configuration:, + # A minimal representation of an Item containing only the essential identifying + # information. + item:, + maximum:, + maximum_amount:, + # User specified key-value pairs for the resource. If not present, this defaults + # to an empty dictionary. Individual keys can be removed by setting the value to + # `null`, and the entire metadata mapping can be cleared by setting `metadata` to + # `null`. + metadata:, + minimum:, + minimum_amount:, + name:, + plan_phase_order:, + price_type:, + # The price id this price replaces. This price will take the place of the replaced + # price in plan version migrations. + replaces_price_id:, + dimensional_price_configuration: nil, + # The LicenseType resource represents a type of license that can be assigned to + # users. License types are used during billing by grouping metrics on the + # configured grouping key. + license_type: nil, + # The pricing model type + model_type: :daily_credit_allowance + ) + end + + sig do + override.returns( + { + id: String, + billable_metric: T.nilable(Orb::BillableMetricTiny), + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: + Orb::Price::DailyCreditAllowance::BillingMode::TaggedSymbol, + cadence: Orb::Price::DailyCreditAllowance::Cadence::TaggedSymbol, composite_price_filters: T.nilable( T::Array[ - Orb::Price::CumulativeGroupedBulk::CompositePriceFilter + Orb::Price::DailyCreditAllowance::CompositePriceFilter ] ), conversion_rate: T.nilable(Float), conversion_rate_config: T.nilable( - Orb::Price::CumulativeGroupedBulk::ConversionRateConfig::Variants + Orb::Price::DailyCreditAllowance::ConversionRateConfig::Variants ), created_at: Time, credit_allocation: T.nilable(Orb::Allocation), - cumulative_grouped_bulk_config: - Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, currency: String, + daily_credit_allowance_config: + Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, discount: T.nilable(Orb::Discount::Variants), external_price_id: T.nilable(String), fixed_price_quantity: T.nilable(Float), @@ -18881,12 +21303,12 @@ module Orb name: String, plan_phase_order: T.nilable(Integer), price_type: - Orb::Price::CumulativeGroupedBulk::PriceType::TaggedSymbol, + Orb::Price::DailyCreditAllowance::PriceType::TaggedSymbol, replaces_price_id: T.nilable(String), dimensional_price_configuration: T.nilable(Orb::DimensionalPriceConfiguration), license_type: - T.nilable(Orb::Price::CumulativeGroupedBulk::LicenseType) + T.nilable(Orb::Price::DailyCreditAllowance::LicenseType) } ) end @@ -18898,25 +21320,25 @@ module Orb TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::CumulativeGroupedBulk::BillingMode) + T.all(Symbol, Orb::Price::DailyCreditAllowance::BillingMode) end OrSymbol = T.type_alias { T.any(Symbol, String) } IN_ADVANCE = T.let( :in_advance, - Orb::Price::CumulativeGroupedBulk::BillingMode::TaggedSymbol + Orb::Price::DailyCreditAllowance::BillingMode::TaggedSymbol ) IN_ARREAR = T.let( :in_arrear, - Orb::Price::CumulativeGroupedBulk::BillingMode::TaggedSymbol + Orb::Price::DailyCreditAllowance::BillingMode::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::CumulativeGroupedBulk::BillingMode::TaggedSymbol + Orb::Price::DailyCreditAllowance::BillingMode::TaggedSymbol ] ) end @@ -18929,44 +21351,44 @@ module Orb TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::CumulativeGroupedBulk::Cadence) + T.all(Symbol, Orb::Price::DailyCreditAllowance::Cadence) end OrSymbol = T.type_alias { T.any(Symbol, String) } ONE_TIME = T.let( :one_time, - Orb::Price::CumulativeGroupedBulk::Cadence::TaggedSymbol + Orb::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Price::CumulativeGroupedBulk::Cadence::TaggedSymbol + Orb::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Price::CumulativeGroupedBulk::Cadence::TaggedSymbol + Orb::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Price::CumulativeGroupedBulk::Cadence::TaggedSymbol + Orb::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ANNUAL = T.let( :annual, - Orb::Price::CumulativeGroupedBulk::Cadence::TaggedSymbol + Orb::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Price::CumulativeGroupedBulk::Cadence::TaggedSymbol + Orb::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( - T::Array[Orb::Price::CumulativeGroupedBulk::Cadence::TaggedSymbol] + T::Array[Orb::Price::DailyCreditAllowance::Cadence::TaggedSymbol] ) end def self.values @@ -18977,7 +21399,7 @@ module Orb OrHash = T.type_alias do T.any( - Orb::Price::CumulativeGroupedBulk::CompositePriceFilter, + Orb::Price::DailyCreditAllowance::CompositePriceFilter, Orb::Internal::AnyHash ) end @@ -18985,7 +21407,7 @@ module Orb # The property of the price to filter on. sig do returns( - Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field::TaggedSymbol ) end attr_accessor :field @@ -18993,7 +21415,7 @@ module Orb # Should prices that match the filter be included or excluded. sig do returns( - Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Operator::TaggedSymbol ) end attr_accessor :operator @@ -19005,9 +21427,9 @@ module Orb sig do params( field: - Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Field::OrSymbol, + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field::OrSymbol, operator: - Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Operator::OrSymbol, + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Operator::OrSymbol, values: T::Array[String] ).returns(T.attached_class) end @@ -19025,9 +21447,9 @@ module Orb override.returns( { field: - Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Field::TaggedSymbol, + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field::TaggedSymbol, operator: - Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Operator::TaggedSymbol, + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Operator::TaggedSymbol, values: T::Array[String] } ) @@ -19043,7 +21465,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Field + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -19051,33 +21473,33 @@ module Orb PRICE_ID = T.let( :price_id, - Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field::TaggedSymbol ) ITEM_ID = T.let( :item_id, - Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field::TaggedSymbol ) PRICE_TYPE = T.let( :price_type, - Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field::TaggedSymbol ) CURRENCY = T.let( :currency, - Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field::TaggedSymbol ) PRICING_UNIT_ID = T.let( :pricing_unit_id, - Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Field::TaggedSymbol ] ) end @@ -19093,7 +21515,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Operator + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Operator ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -19101,18 +21523,18 @@ module Orb INCLUDES = T.let( :includes, - Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Operator::TaggedSymbol ) EXCLUDES = T.let( :excludes, - Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Operator::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::CumulativeGroupedBulk::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::DailyCreditAllowance::CompositePriceFilter::Operator::TaggedSymbol ] ) end @@ -19121,94 +21543,121 @@ module Orb end end - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, + Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # Each tier lower bound must have the same group of values. + # Credits granted per day. Lose-it-or-use-it; does not roll over. + sig { returns(String) } + attr_accessor :daily_allowance + + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + sig { returns(String) } + attr_accessor :default_unit_amount + + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions + + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + sig { returns(String) } + attr_accessor :event_day_property + + # Per-dimension credit rates sig do returns( T::Array[ - Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue + Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue ] ) end - attr_accessor :dimension_values - - sig { returns(String) } - attr_accessor :group + attr_accessor :matrix_values - # Configuration for cumulative_grouped_bulk pricing + # Configuration for daily_credit_allowance pricing sig do params( - dimension_values: + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: T::Array[ - Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue::OrHash - ], - group: String + Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] ).returns(T.attached_class) end def self.new( - # Each tier lower bound must have the same group of values. - dimension_values:, - group: + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end sig do override.returns( { - dimension_values: + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: T::Array[ - Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue - ], - group: String + Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] } ) end def to_hash end - class DimensionValue < Orb::Internal::Type::BaseModel + class MatrixValue < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue, + Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, 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 + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values - # Unit amount for this combination + # Credits charged per unit of usage matching the specified dimension_values sig { returns(String) } attr_accessor :unit_amount - # Configuration for a dimension value entry + # Per-dimension credit price for the daily credit allowance model. sig do params( - grouping_key: String, - tier_lower_bound: String, + dimension_values: T::Array[T.nilable(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 + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values unit_amount: ) end @@ -19216,8 +21665,7 @@ module Orb sig do override.returns( { - grouping_key: String, - tier_lower_bound: String, + dimension_values: T::Array[T.nilable(String)], unit_amount: String } ) @@ -19232,30 +21680,30 @@ module Orb TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::CumulativeGroupedBulk::PriceType) + T.all(Symbol, Orb::Price::DailyCreditAllowance::PriceType) end OrSymbol = T.type_alias { T.any(Symbol, String) } USAGE_PRICE = T.let( :usage_price, - Orb::Price::CumulativeGroupedBulk::PriceType::TaggedSymbol + Orb::Price::DailyCreditAllowance::PriceType::TaggedSymbol ) FIXED_PRICE = T.let( :fixed_price, - Orb::Price::CumulativeGroupedBulk::PriceType::TaggedSymbol + Orb::Price::DailyCreditAllowance::PriceType::TaggedSymbol ) COMPOSITE_PRICE = T.let( :composite_price, - Orb::Price::CumulativeGroupedBulk::PriceType::TaggedSymbol + Orb::Price::DailyCreditAllowance::PriceType::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::CumulativeGroupedBulk::PriceType::TaggedSymbol + Orb::Price::DailyCreditAllowance::PriceType::TaggedSymbol ] ) end @@ -19267,7 +21715,7 @@ module Orb OrHash = T.type_alias do T.any( - Orb::Price::CumulativeGroupedBulk::LicenseType, + Orb::Price::DailyCreditAllowance::LicenseType, Orb::Internal::AnyHash ) end @@ -19312,13 +21760,10 @@ module Orb end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do - T.any( - Orb::Price::CumulativeGroupedAllocation, - Orb::Internal::AnyHash - ) + T.any(Orb::Price::MeteredAllowance, Orb::Internal::AnyHash) end sig { returns(String) } @@ -19344,26 +21789,16 @@ module Orb end attr_writer :billing_cycle_configuration - sig do - returns( - Orb::Price::CumulativeGroupedAllocation::BillingMode::TaggedSymbol - ) - end + sig { returns(Orb::Price::MeteredAllowance::BillingMode::TaggedSymbol) } attr_accessor :billing_mode - sig do - returns( - Orb::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) - end + sig { returns(Orb::Price::MeteredAllowance::Cadence::TaggedSymbol) } attr_accessor :cadence sig do returns( T.nilable( - T::Array[ - Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter - ] + T::Array[Orb::Price::MeteredAllowance::CompositePriceFilter] ) ) end @@ -19375,7 +21810,7 @@ module Orb sig do returns( T.nilable( - Orb::Price::CumulativeGroupedAllocation::ConversionRateConfig::Variants + Orb::Price::MeteredAllowance::ConversionRateConfig::Variants ) ) end @@ -19392,22 +21827,6 @@ module Orb end attr_writer :credit_allocation - # Configuration for cumulative_grouped_allocation pricing - sig do - returns( - Orb::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - ) - end - attr_reader :cumulative_grouped_allocation_config - - sig do - params( - cumulative_grouped_allocation_config: - Orb::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_allocation_config - sig { returns(String) } attr_accessor :currency @@ -19458,6 +21877,18 @@ module Orb sig { returns(T::Hash[Symbol, String]) } attr_accessor :metadata + # Configuration for metered_allowance pricing + sig { returns(Orb::Price::MeteredAllowance::MeteredAllowanceConfig) } + attr_reader :metered_allowance_config + + sig do + params( + metered_allowance_config: + Orb::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash + ).void + end + attr_writer :metered_allowance_config + sig { returns(T.nilable(Orb::Minimum)) } attr_reader :minimum @@ -19477,11 +21908,7 @@ module Orb sig { returns(T.nilable(Integer)) } attr_accessor :plan_phase_order - sig do - returns( - Orb::Price::CumulativeGroupedAllocation::PriceType::TaggedSymbol - ) - end + sig { returns(Orb::Price::MeteredAllowance::PriceType::TaggedSymbol) } attr_accessor :price_type # The price id this price replaces. This price will take the place of the replaced @@ -19503,19 +21930,13 @@ module Orb # The LicenseType resource represents a type of license that can be assigned to # users. License types are used during billing by grouping metrics on the # configured grouping key. - sig do - returns( - T.nilable(Orb::Price::CumulativeGroupedAllocation::LicenseType) - ) - end + sig { returns(T.nilable(Orb::Price::MeteredAllowance::LicenseType)) } attr_reader :license_type sig do params( license_type: - T.nilable( - Orb::Price::CumulativeGroupedAllocation::LicenseType::OrHash - ) + T.nilable(Orb::Price::MeteredAllowance::LicenseType::OrHash) ).void end attr_writer :license_type @@ -19525,13 +21946,12 @@ module Orb id: String, billable_metric: T.nilable(Orb::BillableMetricTiny::OrHash), billing_cycle_configuration: Orb::BillingCycleConfiguration::OrHash, - billing_mode: - Orb::Price::CumulativeGroupedAllocation::BillingMode::OrSymbol, - cadence: Orb::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + billing_mode: Orb::Price::MeteredAllowance::BillingMode::OrSymbol, + cadence: Orb::Price::MeteredAllowance::Cadence::OrSymbol, composite_price_filters: T.nilable( T::Array[ - Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::OrHash + Orb::Price::MeteredAllowance::CompositePriceFilter::OrHash ] ), conversion_rate: T.nilable(Float), @@ -19544,8 +21964,6 @@ module Orb ), created_at: Time, credit_allocation: T.nilable(Orb::Allocation::OrHash), - cumulative_grouped_allocation_config: - Orb::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, currency: String, discount: T.nilable( @@ -19565,19 +21983,18 @@ module Orb maximum: T.nilable(Orb::Maximum::OrHash), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], + metered_allowance_config: + Orb::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, minimum: T.nilable(Orb::Minimum::OrHash), minimum_amount: T.nilable(String), name: String, plan_phase_order: T.nilable(Integer), - price_type: - Orb::Price::CumulativeGroupedAllocation::PriceType::OrSymbol, + price_type: Orb::Price::MeteredAllowance::PriceType::OrSymbol, replaces_price_id: T.nilable(String), dimensional_price_configuration: T.nilable(Orb::DimensionalPriceConfiguration::OrHash), license_type: - T.nilable( - Orb::Price::CumulativeGroupedAllocation::LicenseType::OrHash - ), + T.nilable(Orb::Price::MeteredAllowance::LicenseType::OrHash), model_type: Symbol ).returns(T.attached_class) end @@ -19592,8 +22009,6 @@ module Orb conversion_rate_config:, created_at:, credit_allocation:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, currency:, discount:, external_price_id:, @@ -19610,6 +22025,8 @@ module Orb # `null`, and the entire metadata mapping can be cleared by setting `metadata` to # `null`. metadata:, + # Configuration for metered_allowance pricing + metered_allowance_config:, minimum:, minimum_amount:, name:, @@ -19624,7 +22041,7 @@ module Orb # configured grouping key. license_type: nil, # The pricing model type - model_type: :cumulative_grouped_allocation + model_type: :metered_allowance ) end @@ -19635,24 +22052,19 @@ module Orb billable_metric: T.nilable(Orb::BillableMetricTiny), billing_cycle_configuration: Orb::BillingCycleConfiguration, billing_mode: - Orb::Price::CumulativeGroupedAllocation::BillingMode::TaggedSymbol, - cadence: - Orb::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol, + Orb::Price::MeteredAllowance::BillingMode::TaggedSymbol, + cadence: Orb::Price::MeteredAllowance::Cadence::TaggedSymbol, composite_price_filters: T.nilable( - T::Array[ - Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter - ] + T::Array[Orb::Price::MeteredAllowance::CompositePriceFilter] ), conversion_rate: T.nilable(Float), conversion_rate_config: T.nilable( - Orb::Price::CumulativeGroupedAllocation::ConversionRateConfig::Variants + Orb::Price::MeteredAllowance::ConversionRateConfig::Variants ), created_at: Time, credit_allocation: T.nilable(Orb::Allocation), - cumulative_grouped_allocation_config: - Orb::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, currency: String, discount: T.nilable(Orb::Discount::Variants), external_price_id: T.nilable(String), @@ -19664,18 +22076,18 @@ module Orb maximum: T.nilable(Orb::Maximum), maximum_amount: T.nilable(String), metadata: T::Hash[Symbol, String], + metered_allowance_config: + Orb::Price::MeteredAllowance::MeteredAllowanceConfig, minimum: T.nilable(Orb::Minimum), minimum_amount: T.nilable(String), model_type: Symbol, name: String, plan_phase_order: T.nilable(Integer), - price_type: - Orb::Price::CumulativeGroupedAllocation::PriceType::TaggedSymbol, + price_type: Orb::Price::MeteredAllowance::PriceType::TaggedSymbol, replaces_price_id: T.nilable(String), dimensional_price_configuration: T.nilable(Orb::DimensionalPriceConfiguration), - license_type: - T.nilable(Orb::Price::CumulativeGroupedAllocation::LicenseType) + license_type: T.nilable(Orb::Price::MeteredAllowance::LicenseType) } ) end @@ -19687,29 +22099,24 @@ module Orb TaggedSymbol = T.type_alias do - T.all( - Symbol, - Orb::Price::CumulativeGroupedAllocation::BillingMode - ) + T.all(Symbol, Orb::Price::MeteredAllowance::BillingMode) end OrSymbol = T.type_alias { T.any(Symbol, String) } IN_ADVANCE = T.let( :in_advance, - Orb::Price::CumulativeGroupedAllocation::BillingMode::TaggedSymbol + Orb::Price::MeteredAllowance::BillingMode::TaggedSymbol ) IN_ARREAR = T.let( :in_arrear, - Orb::Price::CumulativeGroupedAllocation::BillingMode::TaggedSymbol + Orb::Price::MeteredAllowance::BillingMode::TaggedSymbol ) sig do override.returns( - T::Array[ - Orb::Price::CumulativeGroupedAllocation::BillingMode::TaggedSymbol - ] + T::Array[Orb::Price::MeteredAllowance::BillingMode::TaggedSymbol] ) end def self.values @@ -19721,46 +22128,35 @@ module Orb TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::CumulativeGroupedAllocation::Cadence) + T.all(Symbol, Orb::Price::MeteredAllowance::Cadence) end OrSymbol = T.type_alias { T.any(Symbol, String) } ONE_TIME = T.let( :one_time, - Orb::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Price::MeteredAllowance::Cadence::TaggedSymbol ) MONTHLY = - T.let( - :monthly, - Orb::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) + T.let(:monthly, Orb::Price::MeteredAllowance::Cadence::TaggedSymbol) QUARTERLY = T.let( :quarterly, - Orb::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Price::MeteredAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Price::MeteredAllowance::Cadence::TaggedSymbol ) ANNUAL = - T.let( - :annual, - Orb::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) + T.let(:annual, Orb::Price::MeteredAllowance::Cadence::TaggedSymbol) CUSTOM = - T.let( - :custom, - Orb::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ) + T.let(:custom, Orb::Price::MeteredAllowance::Cadence::TaggedSymbol) sig do override.returns( - T::Array[ - Orb::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol - ] + T::Array[Orb::Price::MeteredAllowance::Cadence::TaggedSymbol] ) end def self.values @@ -19771,7 +22167,7 @@ module Orb OrHash = T.type_alias do T.any( - Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter, + Orb::Price::MeteredAllowance::CompositePriceFilter, Orb::Internal::AnyHash ) end @@ -19779,7 +22175,7 @@ module Orb # The property of the price to filter on. sig do returns( - Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::MeteredAllowance::CompositePriceFilter::Field::TaggedSymbol ) end attr_accessor :field @@ -19787,7 +22183,7 @@ module Orb # Should prices that match the filter be included or excluded. sig do returns( - Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::MeteredAllowance::CompositePriceFilter::Operator::TaggedSymbol ) end attr_accessor :operator @@ -19799,9 +22195,9 @@ module Orb sig do params( field: - Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Field::OrSymbol, + Orb::Price::MeteredAllowance::CompositePriceFilter::Field::OrSymbol, operator: - Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Operator::OrSymbol, + Orb::Price::MeteredAllowance::CompositePriceFilter::Operator::OrSymbol, values: T::Array[String] ).returns(T.attached_class) end @@ -19819,9 +22215,9 @@ module Orb override.returns( { field: - Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Field::TaggedSymbol, + Orb::Price::MeteredAllowance::CompositePriceFilter::Field::TaggedSymbol, operator: - Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Operator::TaggedSymbol, + Orb::Price::MeteredAllowance::CompositePriceFilter::Operator::TaggedSymbol, values: T::Array[String] } ) @@ -19837,7 +22233,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Field + Orb::Price::MeteredAllowance::CompositePriceFilter::Field ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -19845,33 +22241,33 @@ module Orb PRICE_ID = T.let( :price_id, - Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::MeteredAllowance::CompositePriceFilter::Field::TaggedSymbol ) ITEM_ID = T.let( :item_id, - Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::MeteredAllowance::CompositePriceFilter::Field::TaggedSymbol ) PRICE_TYPE = T.let( :price_type, - Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::MeteredAllowance::CompositePriceFilter::Field::TaggedSymbol ) CURRENCY = T.let( :currency, - Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::MeteredAllowance::CompositePriceFilter::Field::TaggedSymbol ) PRICING_UNIT_ID = T.let( :pricing_unit_id, - Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::MeteredAllowance::CompositePriceFilter::Field::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Field::TaggedSymbol + Orb::Price::MeteredAllowance::CompositePriceFilter::Field::TaggedSymbol ] ) end @@ -19887,7 +22283,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Operator + Orb::Price::MeteredAllowance::CompositePriceFilter::Operator ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -19895,18 +22291,18 @@ module Orb INCLUDES = T.let( :includes, - Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::MeteredAllowance::CompositePriceFilter::Operator::TaggedSymbol ) EXCLUDES = T.let( :excludes, - Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::MeteredAllowance::CompositePriceFilter::Operator::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter::Operator::TaggedSymbol + Orb::Price::MeteredAllowance::CompositePriceFilter::Operator::TaggedSymbol ] ) end @@ -19915,59 +22311,91 @@ module Orb end end - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::Price::MeteredAllowance::MeteredAllowanceConfig, Orb::Internal::AnyHash ) end - # The overall allocation across all groups + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. sig { returns(String) } - attr_accessor :cumulative_allocation + attr_accessor :allowance_grouping_value - # The allocation per individual group + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. sig { returns(String) } - attr_accessor :group_allocation + attr_accessor :consumption_grouping_value - # The event property used to group usage before applying allocations + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. sig { returns(String) } attr_accessor :grouping_key - # The amount to charge for each unit outside of the allocation + # Per-unit price applied to gross consumption and to the allowance credit. sig { returns(String) } attr_accessor :unit_amount - # Configuration for cumulative_grouped_allocation pricing + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing sig do params( - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String ).returns(T.attached_class) end def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil ) end sig do override.returns( { - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } ) end @@ -19980,31 +22408,29 @@ module Orb TaggedSymbol = T.type_alias do - T.all(Symbol, Orb::Price::CumulativeGroupedAllocation::PriceType) + T.all(Symbol, Orb::Price::MeteredAllowance::PriceType) end OrSymbol = T.type_alias { T.any(Symbol, String) } USAGE_PRICE = T.let( :usage_price, - Orb::Price::CumulativeGroupedAllocation::PriceType::TaggedSymbol + Orb::Price::MeteredAllowance::PriceType::TaggedSymbol ) FIXED_PRICE = T.let( :fixed_price, - Orb::Price::CumulativeGroupedAllocation::PriceType::TaggedSymbol + Orb::Price::MeteredAllowance::PriceType::TaggedSymbol ) COMPOSITE_PRICE = T.let( :composite_price, - Orb::Price::CumulativeGroupedAllocation::PriceType::TaggedSymbol + Orb::Price::MeteredAllowance::PriceType::TaggedSymbol ) sig do override.returns( - T::Array[ - Orb::Price::CumulativeGroupedAllocation::PriceType::TaggedSymbol - ] + T::Array[Orb::Price::MeteredAllowance::PriceType::TaggedSymbol] ) end def self.values @@ -20015,7 +22441,7 @@ module Orb OrHash = T.type_alias do T.any( - Orb::Price::CumulativeGroupedAllocation::LicenseType, + Orb::Price::MeteredAllowance::LicenseType, Orb::Internal::AnyHash ) end diff --git a/rbi/orb/models/price_create_params.rbi b/rbi/orb/models/price_create_params.rbi index 3c986f28..4de000b5 100644 --- a/rbi/orb/models/price_create_params.rbi +++ b/rbi/orb/models/price_create_params.rbi @@ -27,6 +27,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice, Orb::NewFloatingUnitWithPercentPrice, Orb::NewFloatingMatrixWithAllocationPrice, + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts, Orb::NewFloatingTieredWithProrationPrice, Orb::NewFloatingUnitWithProrationPrice, Orb::NewFloatingGroupedAllocationPrice, @@ -41,6 +42,8 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::PriceCreateParams::Body::CumulativeGroupedAllocation, + Orb::PriceCreateParams::Body::DailyCreditAllowance, + Orb::PriceCreateParams::Body::MeteredAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::PriceCreateParams::Body::Percent, Orb::PriceCreateParams::Body::EventOutput @@ -67,6 +70,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice::OrHash, Orb::NewFloatingUnitWithPercentPrice::OrHash, Orb::NewFloatingMatrixWithAllocationPrice::OrHash, + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::OrHash, Orb::NewFloatingTieredWithProrationPrice::OrHash, Orb::NewFloatingUnitWithProrationPrice::OrHash, Orb::NewFloatingGroupedAllocationPrice::OrHash, @@ -81,6 +85,8 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice::OrHash, Orb::NewFloatingCumulativeGroupedBulkPrice::OrHash, Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::OrHash, + Orb::PriceCreateParams::Body::DailyCreditAllowance::OrHash, + Orb::PriceCreateParams::Body::MeteredAllowance::OrHash, Orb::NewFloatingMinimumCompositePrice::OrHash, Orb::PriceCreateParams::Body::Percent::OrHash, Orb::PriceCreateParams::Body::EventOutput::OrHash @@ -114,6 +120,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice, Orb::NewFloatingUnitWithPercentPrice, Orb::NewFloatingMatrixWithAllocationPrice, + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts, Orb::NewFloatingTieredWithProrationPrice, Orb::NewFloatingUnitWithProrationPrice, Orb::NewFloatingGroupedAllocationPrice, @@ -128,6 +135,8 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::PriceCreateParams::Body::CumulativeGroupedAllocation, + Orb::PriceCreateParams::Body::DailyCreditAllowance, + Orb::PriceCreateParams::Body::MeteredAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::PriceCreateParams::Body::Percent, Orb::PriceCreateParams::Body::EventOutput @@ -160,6 +169,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice, Orb::NewFloatingUnitWithPercentPrice, Orb::NewFloatingMatrixWithAllocationPrice, + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts, Orb::NewFloatingTieredWithProrationPrice, Orb::NewFloatingUnitWithProrationPrice, Orb::NewFloatingGroupedAllocationPrice, @@ -174,6 +184,8 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::PriceCreateParams::Body::CumulativeGroupedAllocation, + Orb::PriceCreateParams::Body::DailyCreditAllowance, + Orb::PriceCreateParams::Body::MeteredAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::PriceCreateParams::Body::Percent, Orb::PriceCreateParams::Body::EventOutput @@ -640,11 +652,1280 @@ module Orb end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for matrix_with_threshold_discounts pricing + sig do + returns( + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + ) + end + attr_reader :matrix_with_threshold_discounts_config + + sig do + params( + matrix_with_threshold_discounts_config: + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash + ).void + end + attr_writer :matrix_with_threshold_discounts_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence::OrSymbol, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # An ISO 4217 currency string for which this price is billed in. + currency:, + # The id of the item the price will be associated with. + item_id:, + # Configuration for matrix_with_threshold_discounts pricing + matrix_with_threshold_discounts_config:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # The pricing model type + model_type: :matrix_with_threshold_discounts + ) + end + + sig do + override.returns( + { + cadence: + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence::OrSymbol, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + Orb::Internal::AnyHash + ) + end + + # Unit price used for usage that does not match any defined matrix cell. + sig { returns(String) } + attr_accessor :default_unit_amount + + # First matrix dimension key. + sig { returns(String) } + attr_accessor :first_dimension + + # Per-cell unit prices. + sig do + returns( + T::Array[ + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Optional second matrix dimension key. + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension + + sig do + returns( + T.nilable( + T::Array[ + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + ) + ) + end + attr_reader :threshold_discount_groups + + sig do + params( + threshold_discount_groups: + T::Array[ + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).void + end + attr_writer :threshold_discount_groups + + # Configuration for matrix_with_threshold_discounts pricing + sig do + params( + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Unit price used for usage that does not match any defined matrix cell. + default_unit_amount:, + # First matrix dimension key. + first_dimension:, + # Per-cell unit prices. + matrix_values:, + # Optional second matrix dimension key. + second_dimension: nil, + threshold_discount_groups: nil + ) + end + + sig do + override.returns( + { + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :first_dimension_value + + sig { returns(String) } + attr_accessor :unit_amount + + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension_value + + sig do + params( + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + first_dimension_value:, + unit_amount:, + second_dimension_value: nil + ) + end + + sig do + override.returns( + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + } + ) + end + def to_hash + end + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup, + Orb::Internal::AnyHash + ) + end + + # Discount rate applied to spend above the threshold. + sig { returns(String) } + attr_accessor :above_threshold_discount_percentage + + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + sig { returns(String) } + attr_accessor :below_threshold_discount_percentage + + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + sig { returns(String) } + attr_accessor :cell_coordinates + + sig { returns(String) } + attr_accessor :threshold_amount + + sig { returns(T.nilable(String)) } + attr_accessor :description + + sig do + params( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Discount rate applied to spend above the threshold. + above_threshold_discount_percentage:, + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + below_threshold_discount_percentage:, + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + cell_coordinates:, + threshold_amount:, + description: nil + ) + end + + sig do + override.returns( + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + } + ) + end + def to_hash + end + end + end + end + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds, + Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # Configuration for grouped_with_min_max_thresholds pricing + sig do + returns( + Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + ) + end + attr_reader :grouped_with_min_max_thresholds_config + + sig do + params( + grouped_with_min_max_thresholds_config: + Orb::PriceCreateParams::Body::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 + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::PriceCreateParams::Body::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 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( + { + 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 + + # 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 + + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceCreateParams::Body::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::PriceCreateParams::Body::CumulativeGroupedAllocation, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::OrSymbol + ) + end + 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 + params( + cumulative_grouped_allocation_config: + Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + ).void + end + 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 + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::PriceCreateParams::Body::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( + # 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( + { + 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 + + # 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) } + + 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 + ) + + sig do + override.returns( + T::Array[ + Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceCreateParams::Body::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 DailyCreditAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceCreateParams::Body::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -652,7 +1933,7 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::OrSymbol + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence @@ -661,21 +1942,21 @@ module Orb sig { returns(String) } attr_accessor :currency - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for daily_credit_allowance pricing sig do returns( - Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig ) end - attr_reader :grouped_with_min_max_thresholds_config + attr_reader :daily_credit_allowance_config sig do params( - grouped_with_min_max_thresholds_config: - Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + daily_credit_allowance_config: + Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash ).void end - attr_writer :grouped_with_min_max_thresholds_config + attr_writer :daily_credit_allowance_config # The id of the item the price will be associated with. sig { returns(String) } @@ -780,10 +2061,10 @@ module Orb sig do params( cadence: - Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::OrSymbol, currency: String, - grouped_with_min_max_thresholds_config: - Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, + daily_credit_allowance_config: + Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -815,8 +2096,8 @@ module Orb 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:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -853,7 +2134,7 @@ module Orb # by setting `metadata` to `null`. metadata: nil, # The pricing model type - model_type: :grouped_with_min_max_thresholds + model_type: :daily_credit_allowance ) end @@ -861,10 +2142,10 @@ module Orb override.returns( { cadence: - Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::OrSymbol, currency: String, - grouped_with_min_max_thresholds_config: - Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + daily_credit_allowance_config: + Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, model_type: Symbol, name: String, @@ -903,7 +2184,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -911,38 +2192,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -950,72 +2231,144 @@ module Orb end end - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # The event property used to group before applying thresholds + # Credits granted per day. Lose-it-or-use-it; does not roll over. sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :daily_allowance - # The maximum amount to charge each group + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value sig { returns(String) } - attr_accessor :maximum_charge + attr_accessor :default_unit_amount - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions - # The base price charged per group + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. sig { returns(String) } - attr_accessor :per_unit_rate + attr_accessor :event_day_property - # Configuration for grouped_with_min_max_thresholds pricing + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing sig do params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] ).returns(T.attached_class) end def self.new( - # 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: + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end sig do override.returns( { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] } ) end def to_hash end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PriceCreateParams::Body::CumulativeGroupedAllocation, + Orb::PriceCreateParams::Body::MeteredAllowance, Orb::Internal::AnyHash ) end @@ -1023,34 +2376,34 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::OrSymbol + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for cumulative_grouped_allocation pricing + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for metered_allowance pricing sig do returns( - Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + Orb::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig ) end - attr_reader :cumulative_grouped_allocation_config + attr_reader :metered_allowance_config sig do params( - cumulative_grouped_allocation_config: - Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + metered_allowance_config: + Orb::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig::OrHash ).void end - 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 + attr_writer :metered_allowance_config # The pricing model type sig { returns(Symbol) } @@ -1151,11 +2504,11 @@ module Orb sig do params( cadence: - Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::OrSymbol, currency: String, item_id: String, + metered_allowance_config: + Orb::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig::OrHash, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -1184,12 +2537,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, # An ISO 4217 currency string for which this price is billed in. currency:, # The id of the item the price will be associated with. item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, # The name of the price. name:, # The id of the billable metric for the price. Only needed if the price is @@ -1224,7 +2577,7 @@ module Orb # by setting `metadata` to `null`. metadata: nil, # The pricing model type - model_type: :cumulative_grouped_allocation + model_type: :metered_allowance ) end @@ -1232,11 +2585,11 @@ module Orb override.returns( { cadence: - Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::OrSymbol, currency: String, item_id: String, + metered_allowance_config: + Orb::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -1274,7 +2627,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -1282,38 +2635,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::PriceCreateParams::Body::MeteredAllowance::Cadence::TaggedSymbol ] ) end @@ -1321,59 +2674,91 @@ module Orb end end - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig, Orb::Internal::AnyHash ) end - # The overall allocation across all groups + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. sig { returns(String) } - attr_accessor :cumulative_allocation + attr_accessor :allowance_grouping_value - # The allocation per individual group + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. sig { returns(String) } - attr_accessor :group_allocation + attr_accessor :consumption_grouping_value - # The event property used to group usage before applying allocations + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. sig { returns(String) } attr_accessor :grouping_key - # The amount to charge for each unit outside of the allocation + # Per-unit price applied to gross consumption and to the allowance credit. sig { returns(String) } attr_accessor :unit_amount - # Configuration for cumulative_grouped_allocation pricing + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing sig do params( - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String ).returns(T.attached_class) end def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil ) end sig do override.returns( { - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } ) end diff --git a/rbi/orb/models/price_evaluate_multiple_params.rbi b/rbi/orb/models/price_evaluate_multiple_params.rbi index 74a91dd7..061c4899 100644 --- a/rbi/orb/models/price_evaluate_multiple_params.rbi +++ b/rbi/orb/models/price_evaluate_multiple_params.rbi @@ -137,6 +137,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice, Orb::NewFloatingUnitWithPercentPrice, Orb::NewFloatingMatrixWithAllocationPrice, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::NewFloatingTieredWithProrationPrice, Orb::NewFloatingUnitWithProrationPrice, Orb::NewFloatingGroupedAllocationPrice, @@ -151,6 +152,8 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput @@ -187,6 +190,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice::OrHash, Orb::NewFloatingUnitWithPercentPrice::OrHash, Orb::NewFloatingMatrixWithAllocationPrice::OrHash, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::OrHash, Orb::NewFloatingTieredWithProrationPrice::OrHash, Orb::NewFloatingUnitWithProrationPrice::OrHash, Orb::NewFloatingGroupedAllocationPrice::OrHash, @@ -201,6 +205,8 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice::OrHash, Orb::NewFloatingCumulativeGroupedBulkPrice::OrHash, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::OrHash, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::OrHash, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::OrHash, Orb::NewFloatingMinimumCompositePrice::OrHash, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent::OrHash, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput::OrHash @@ -255,6 +261,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice, Orb::NewFloatingUnitWithPercentPrice, Orb::NewFloatingMatrixWithAllocationPrice, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::NewFloatingTieredWithProrationPrice, Orb::NewFloatingUnitWithProrationPrice, Orb::NewFloatingGroupedAllocationPrice, @@ -269,6 +276,8 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput @@ -302,6 +311,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice, Orb::NewFloatingUnitWithPercentPrice, Orb::NewFloatingMatrixWithAllocationPrice, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::NewFloatingTieredWithProrationPrice, Orb::NewFloatingUnitWithProrationPrice, Orb::NewFloatingGroupedAllocationPrice, @@ -316,6 +326,8 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent, Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput @@ -782,11 +794,1280 @@ module Orb end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for matrix_with_threshold_discounts pricing + sig do + returns( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + ) + end + attr_reader :matrix_with_threshold_discounts_config + + sig do + params( + matrix_with_threshold_discounts_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash + ).void + end + attr_writer :matrix_with_threshold_discounts_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # An ISO 4217 currency string for which this price is billed in. + currency:, + # The id of the item the price will be associated with. + item_id:, + # Configuration for matrix_with_threshold_discounts pricing + matrix_with_threshold_discounts_config:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # The pricing model type + model_type: :matrix_with_threshold_discounts + ) + end + + sig do + override.returns( + { + cadence: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + Orb::Internal::AnyHash + ) + end + + # Unit price used for usage that does not match any defined matrix cell. + sig { returns(String) } + attr_accessor :default_unit_amount + + # First matrix dimension key. + sig { returns(String) } + attr_accessor :first_dimension + + # Per-cell unit prices. + sig do + returns( + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Optional second matrix dimension key. + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension + + sig do + returns( + T.nilable( + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + ) + ) + end + attr_reader :threshold_discount_groups + + sig do + params( + threshold_discount_groups: + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).void + end + attr_writer :threshold_discount_groups + + # Configuration for matrix_with_threshold_discounts pricing + sig do + params( + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Unit price used for usage that does not match any defined matrix cell. + default_unit_amount:, + # First matrix dimension key. + first_dimension:, + # Per-cell unit prices. + matrix_values:, + # Optional second matrix dimension key. + second_dimension: nil, + threshold_discount_groups: nil + ) + end + + sig do + override.returns( + { + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :first_dimension_value + + sig { returns(String) } + attr_accessor :unit_amount + + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension_value + + sig do + params( + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + first_dimension_value:, + unit_amount:, + second_dimension_value: nil + ) + end + + sig do + override.returns( + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + } + ) + end + def to_hash + end + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup, + Orb::Internal::AnyHash + ) + end + + # Discount rate applied to spend above the threshold. + sig { returns(String) } + attr_accessor :above_threshold_discount_percentage + + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + sig { returns(String) } + attr_accessor :below_threshold_discount_percentage + + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + sig { returns(String) } + attr_accessor :cell_coordinates + + sig { returns(String) } + attr_accessor :threshold_amount + + sig { returns(T.nilable(String)) } + attr_accessor :description + + sig do + params( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Discount rate applied to spend above the threshold. + above_threshold_discount_percentage:, + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + below_threshold_discount_percentage:, + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + cell_coordinates:, + threshold_amount:, + description: nil + ) + end + + sig do + override.returns( + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + } + ) + end + def to_hash + end + end + end + end + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # Configuration for grouped_with_min_max_thresholds pricing + sig do + returns( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + ) + end + attr_reader :grouped_with_min_max_thresholds_config + + sig do + params( + grouped_with_min_max_thresholds_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::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 + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + currency: String, + grouped_with_min_max_thresholds_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::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 + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # An ISO 4217 currency string for which this price is billed in. + currency:, + # Configuration for 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( + { + cadence: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + currency: String, + grouped_with_min_max_thresholds_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::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 + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::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::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # Configuration for cumulative_grouped_allocation pricing + sig do + returns( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + ) + end + attr_reader :cumulative_grouped_allocation_config + + sig do + params( + cumulative_grouped_allocation_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + ).void + end + 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 + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::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( + # 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( + { + cadence: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::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 + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::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 DailyCreditAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -794,7 +2075,7 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence @@ -803,21 +2084,21 @@ module Orb sig { returns(String) } attr_accessor :currency - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for daily_credit_allowance pricing sig do returns( - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig ) end - attr_reader :grouped_with_min_max_thresholds_config + attr_reader :daily_credit_allowance_config sig do params( - grouped_with_min_max_thresholds_config: - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + daily_credit_allowance_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash ).void end - attr_writer :grouped_with_min_max_thresholds_config + attr_writer :daily_credit_allowance_config # The id of the item the price will be associated with. sig { returns(String) } @@ -922,10 +2203,10 @@ module Orb sig do params( cadence: - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::OrSymbol, currency: String, - grouped_with_min_max_thresholds_config: - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, + daily_credit_allowance_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -957,8 +2238,8 @@ module Orb 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:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -995,7 +2276,7 @@ module Orb # by setting `metadata` to `null`. metadata: nil, # The pricing model type - model_type: :grouped_with_min_max_thresholds + model_type: :daily_credit_allowance ) end @@ -1003,10 +2284,10 @@ module Orb override.returns( { cadence: - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::OrSymbol, currency: String, - grouped_with_min_max_thresholds_config: - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + daily_credit_allowance_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, model_type: Symbol, name: String, @@ -1045,7 +2326,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -1053,38 +2334,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -1092,72 +2373,144 @@ module Orb end end - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # The event property used to group before applying thresholds + # Credits granted per day. Lose-it-or-use-it; does not roll over. sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :daily_allowance - # The maximum amount to charge each group + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value sig { returns(String) } - attr_accessor :maximum_charge + attr_accessor :default_unit_amount - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions - # The base price charged per group + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. sig { returns(String) } - attr_accessor :per_unit_rate + attr_accessor :event_day_property - # Configuration for grouped_with_min_max_thresholds pricing + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing sig do params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] ).returns(T.attached_class) end def self.new( - # 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: + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end sig do override.returns( { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] } ) end def to_hash end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance, Orb::Internal::AnyHash ) end @@ -1165,34 +2518,34 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::OrSymbol + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for cumulative_grouped_allocation pricing + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for metered_allowance pricing sig do returns( - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig ) end - attr_reader :cumulative_grouped_allocation_config + attr_reader :metered_allowance_config sig do params( - cumulative_grouped_allocation_config: - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + metered_allowance_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash ).void end - 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 + attr_writer :metered_allowance_config # The pricing model type sig { returns(Symbol) } @@ -1293,11 +2646,11 @@ module Orb sig do params( cadence: - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::OrSymbol, currency: String, item_id: String, + metered_allowance_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -1326,12 +2679,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, # An ISO 4217 currency string for which this price is billed in. currency:, # The id of the item the price will be associated with. item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, # The name of the price. name:, # The id of the billable metric for the price. Only needed if the price is @@ -1366,7 +2719,7 @@ module Orb # by setting `metadata` to `null`. metadata: nil, # The pricing model type - model_type: :cumulative_grouped_allocation + model_type: :metered_allowance ) end @@ -1374,11 +2727,11 @@ module Orb override.returns( { cadence: - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::OrSymbol, currency: String, item_id: String, + metered_allowance_config: + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -1416,7 +2769,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -1424,38 +2777,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol ] ) end @@ -1463,59 +2816,91 @@ module Orb end end - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig, Orb::Internal::AnyHash ) end - # The overall allocation across all groups + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. sig { returns(String) } - attr_accessor :cumulative_allocation + attr_accessor :allowance_grouping_value - # The allocation per individual group + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. sig { returns(String) } - attr_accessor :group_allocation + attr_accessor :consumption_grouping_value - # The event property used to group usage before applying allocations + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. sig { returns(String) } attr_accessor :grouping_key - # The amount to charge for each unit outside of the allocation + # Per-unit price applied to gross consumption and to the allowance credit. sig { returns(String) } attr_accessor :unit_amount - # Configuration for cumulative_grouped_allocation pricing + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing sig do params( - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String ).returns(T.attached_class) end def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil ) end sig do override.returns( { - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } ) end diff --git a/rbi/orb/models/price_evaluate_preview_events_params.rbi b/rbi/orb/models/price_evaluate_preview_events_params.rbi index d6685482..bdac2080 100644 --- a/rbi/orb/models/price_evaluate_preview_events_params.rbi +++ b/rbi/orb/models/price_evaluate_preview_events_params.rbi @@ -238,6 +238,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice, Orb::NewFloatingUnitWithPercentPrice, Orb::NewFloatingMatrixWithAllocationPrice, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::NewFloatingTieredWithProrationPrice, Orb::NewFloatingUnitWithProrationPrice, Orb::NewFloatingGroupedAllocationPrice, @@ -252,6 +253,8 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput @@ -288,6 +291,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice::OrHash, Orb::NewFloatingUnitWithPercentPrice::OrHash, Orb::NewFloatingMatrixWithAllocationPrice::OrHash, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::OrHash, Orb::NewFloatingTieredWithProrationPrice::OrHash, Orb::NewFloatingUnitWithProrationPrice::OrHash, Orb::NewFloatingGroupedAllocationPrice::OrHash, @@ -302,6 +306,8 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice::OrHash, Orb::NewFloatingCumulativeGroupedBulkPrice::OrHash, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::OrHash, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::OrHash, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::OrHash, Orb::NewFloatingMinimumCompositePrice::OrHash, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent::OrHash, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput::OrHash @@ -356,6 +362,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice, Orb::NewFloatingUnitWithPercentPrice, Orb::NewFloatingMatrixWithAllocationPrice, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::NewFloatingTieredWithProrationPrice, Orb::NewFloatingUnitWithProrationPrice, Orb::NewFloatingGroupedAllocationPrice, @@ -370,6 +377,8 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput @@ -403,6 +412,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice, Orb::NewFloatingUnitWithPercentPrice, Orb::NewFloatingMatrixWithAllocationPrice, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::NewFloatingTieredWithProrationPrice, Orb::NewFloatingUnitWithProrationPrice, Orb::NewFloatingGroupedAllocationPrice, @@ -417,6 +427,8 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput @@ -883,11 +895,1280 @@ module Orb end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for matrix_with_threshold_discounts pricing + sig do + returns( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + ) + end + attr_reader :matrix_with_threshold_discounts_config + + sig do + params( + matrix_with_threshold_discounts_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash + ).void + end + attr_writer :matrix_with_threshold_discounts_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # An ISO 4217 currency string for which this price is billed in. + currency:, + # The id of the item the price will be associated with. + item_id:, + # Configuration for matrix_with_threshold_discounts pricing + matrix_with_threshold_discounts_config:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # The pricing model type + model_type: :matrix_with_threshold_discounts + ) + end + + sig do + override.returns( + { + cadence: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + Orb::Internal::AnyHash + ) + end + + # Unit price used for usage that does not match any defined matrix cell. + sig { returns(String) } + attr_accessor :default_unit_amount + + # First matrix dimension key. + sig { returns(String) } + attr_accessor :first_dimension + + # Per-cell unit prices. + sig do + returns( + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Optional second matrix dimension key. + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension + + sig do + returns( + T.nilable( + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + ) + ) + end + attr_reader :threshold_discount_groups + + sig do + params( + threshold_discount_groups: + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).void + end + attr_writer :threshold_discount_groups + + # Configuration for matrix_with_threshold_discounts pricing + sig do + params( + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Unit price used for usage that does not match any defined matrix cell. + default_unit_amount:, + # First matrix dimension key. + first_dimension:, + # Per-cell unit prices. + matrix_values:, + # Optional second matrix dimension key. + second_dimension: nil, + threshold_discount_groups: nil + ) + end + + sig do + override.returns( + { + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :first_dimension_value + + sig { returns(String) } + attr_accessor :unit_amount + + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension_value + + sig do + params( + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + first_dimension_value:, + unit_amount:, + second_dimension_value: nil + ) + end + + sig do + override.returns( + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + } + ) + end + def to_hash + end + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup, + Orb::Internal::AnyHash + ) + end + + # Discount rate applied to spend above the threshold. + sig { returns(String) } + attr_accessor :above_threshold_discount_percentage + + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + sig { returns(String) } + attr_accessor :below_threshold_discount_percentage + + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + sig { returns(String) } + attr_accessor :cell_coordinates + + sig { returns(String) } + attr_accessor :threshold_amount + + sig { returns(T.nilable(String)) } + attr_accessor :description + + sig do + params( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Discount rate applied to spend above the threshold. + above_threshold_discount_percentage:, + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + below_threshold_discount_percentage:, + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + cell_coordinates:, + threshold_amount:, + description: nil + ) + end + + sig do + override.returns( + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + } + ) + end + def to_hash + end + end + end + end + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # Configuration for grouped_with_min_max_thresholds pricing + sig do + returns( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + ) + end + attr_reader :grouped_with_min_max_thresholds_config + + sig do + params( + grouped_with_min_max_thresholds_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::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 + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + currency: String, + grouped_with_min_max_thresholds_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::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 + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # An ISO 4217 currency string for which this price is billed in. + currency:, + # Configuration for 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( + { + cadence: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + currency: String, + grouped_with_min_max_thresholds_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::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 + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::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::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # Configuration for cumulative_grouped_allocation pricing + sig do + returns( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + ) + end + attr_reader :cumulative_grouped_allocation_config + + sig do + params( + cumulative_grouped_allocation_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + ).void + end + 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 + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::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( + # 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( + { + cadence: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::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 + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::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 DailyCreditAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -895,7 +2176,7 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence @@ -904,21 +2185,21 @@ module Orb sig { returns(String) } attr_accessor :currency - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for daily_credit_allowance pricing sig do returns( - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig ) end - attr_reader :grouped_with_min_max_thresholds_config + attr_reader :daily_credit_allowance_config sig do params( - grouped_with_min_max_thresholds_config: - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + daily_credit_allowance_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash ).void end - attr_writer :grouped_with_min_max_thresholds_config + attr_writer :daily_credit_allowance_config # The id of the item the price will be associated with. sig { returns(String) } @@ -1023,10 +2304,10 @@ module Orb sig do params( cadence: - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::OrSymbol, currency: String, - grouped_with_min_max_thresholds_config: - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, + daily_credit_allowance_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -1058,8 +2339,8 @@ module Orb 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:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -1096,7 +2377,7 @@ module Orb # by setting `metadata` to `null`. metadata: nil, # The pricing model type - model_type: :grouped_with_min_max_thresholds + model_type: :daily_credit_allowance ) end @@ -1104,10 +2385,10 @@ module Orb override.returns( { cadence: - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::OrSymbol, currency: String, - grouped_with_min_max_thresholds_config: - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + daily_credit_allowance_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, model_type: Symbol, name: String, @@ -1146,7 +2427,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -1154,38 +2435,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -1193,72 +2474,144 @@ module Orb end end - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # The event property used to group before applying thresholds + # Credits granted per day. Lose-it-or-use-it; does not roll over. sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :daily_allowance - # The maximum amount to charge each group + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value sig { returns(String) } - attr_accessor :maximum_charge + attr_accessor :default_unit_amount - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions - # The base price charged per group + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. sig { returns(String) } - attr_accessor :per_unit_rate + attr_accessor :event_day_property - # Configuration for grouped_with_min_max_thresholds pricing + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing sig do params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] ).returns(T.attached_class) end def self.new( - # 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: + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end sig do override.returns( { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] } ) end def to_hash end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, Orb::Internal::AnyHash ) end @@ -1266,34 +2619,34 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::OrSymbol + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for cumulative_grouped_allocation pricing + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for metered_allowance pricing sig do returns( - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig ) end - attr_reader :cumulative_grouped_allocation_config + attr_reader :metered_allowance_config sig do params( - cumulative_grouped_allocation_config: - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + metered_allowance_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash ).void end - 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 + attr_writer :metered_allowance_config # The pricing model type sig { returns(Symbol) } @@ -1394,11 +2747,11 @@ module Orb sig do params( cadence: - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::OrSymbol, currency: String, item_id: String, + metered_allowance_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -1427,12 +2780,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, # An ISO 4217 currency string for which this price is billed in. currency:, # The id of the item the price will be associated with. item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, # The name of the price. name:, # The id of the billable metric for the price. Only needed if the price is @@ -1467,7 +2820,7 @@ module Orb # by setting `metadata` to `null`. metadata: nil, # The pricing model type - model_type: :cumulative_grouped_allocation + model_type: :metered_allowance ) end @@ -1475,11 +2828,11 @@ module Orb override.returns( { cadence: - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::OrSymbol, currency: String, item_id: String, + metered_allowance_config: + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -1517,7 +2870,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -1525,38 +2878,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence::TaggedSymbol ] ) end @@ -1564,59 +2917,91 @@ module Orb end end - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig, Orb::Internal::AnyHash ) end - # The overall allocation across all groups + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. sig { returns(String) } - attr_accessor :cumulative_allocation + attr_accessor :allowance_grouping_value - # The allocation per individual group + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. sig { returns(String) } - attr_accessor :group_allocation + attr_accessor :consumption_grouping_value - # The event property used to group usage before applying allocations + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. sig { returns(String) } attr_accessor :grouping_key - # The amount to charge for each unit outside of the allocation + # Per-unit price applied to gross consumption and to the allowance credit. sig { returns(String) } attr_accessor :unit_amount - # Configuration for cumulative_grouped_allocation pricing + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing sig do params( - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String ).returns(T.attached_class) end def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil ) end sig do override.returns( { - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } ) end diff --git a/rbi/orb/models/price_interval.rbi b/rbi/orb/models/price_interval.rbi index 2122ad69..e51b6576 100644 --- a/rbi/orb/models/price_interval.rbi +++ b/rbi/orb/models/price_interval.rbi @@ -103,6 +103,7 @@ module Orb Orb::Price::PackageWithAllocation::OrHash, Orb::Price::UnitWithPercent::OrHash, Orb::Price::MatrixWithAllocation::OrHash, + Orb::Price::MatrixWithThresholdDiscounts::OrHash, Orb::Price::TieredWithProration::OrHash, Orb::Price::UnitWithProration::OrHash, Orb::Price::GroupedAllocation::OrHash, @@ -117,6 +118,8 @@ module Orb Orb::Price::ScalableMatrixWithTieredPricing::OrHash, Orb::Price::CumulativeGroupedBulk::OrHash, Orb::Price::CumulativeGroupedAllocation::OrHash, + Orb::Price::DailyCreditAllowance::OrHash, + Orb::Price::MeteredAllowance::OrHash, Orb::Price::MinimumComposite::OrHash, Orb::Price::Percent::OrHash, Orb::Price::EventOutput::OrHash diff --git a/rbi/orb/models/subscription_create_params.rbi b/rbi/orb/models/subscription_create_params.rbi index 4c6d35e1..83a828bf 100644 --- a/rbi/orb/models/subscription_create_params.rbi +++ b/rbi/orb/models/subscription_create_params.rbi @@ -602,6 +602,7 @@ module Orb Orb::NewSubscriptionPackageWithAllocationPrice, Orb::NewSubscriptionUnitWithPercentPrice, Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::NewSubscriptionUnitWithProrationPrice, Orb::NewSubscriptionGroupedAllocationPrice, @@ -616,6 +617,8 @@ module Orb Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::NewSubscriptionCumulativeGroupedBulkPrice, Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance, Orb::NewSubscriptionMinimumCompositePrice, Orb::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput @@ -662,6 +665,7 @@ module Orb Orb::NewSubscriptionPackageWithAllocationPrice::OrHash, Orb::NewSubscriptionUnitWithPercentPrice::OrHash, Orb::NewSubscriptionMatrixWithAllocationPrice::OrHash, + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::OrHash, Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::OrHash, Orb::NewSubscriptionUnitWithProrationPrice::OrHash, Orb::NewSubscriptionGroupedAllocationPrice::OrHash, @@ -676,6 +680,8 @@ module Orb Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice::OrHash, Orb::NewSubscriptionCumulativeGroupedBulkPrice::OrHash, Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::OrHash, + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::OrHash, + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::OrHash, Orb::NewSubscriptionMinimumCompositePrice::OrHash, Orb::SubscriptionCreateParams::AddPrice::Price::Percent::OrHash, Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::OrHash @@ -748,6 +754,7 @@ module Orb Orb::NewSubscriptionPackageWithAllocationPrice, Orb::NewSubscriptionUnitWithPercentPrice, Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::NewSubscriptionUnitWithProrationPrice, Orb::NewSubscriptionGroupedAllocationPrice, @@ -762,6 +769,8 @@ module Orb Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::NewSubscriptionCumulativeGroupedBulkPrice, Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance, Orb::NewSubscriptionMinimumCompositePrice, Orb::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput @@ -796,6 +805,7 @@ module Orb Orb::NewSubscriptionPackageWithAllocationPrice, Orb::NewSubscriptionUnitWithPercentPrice, Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::NewSubscriptionUnitWithProrationPrice, Orb::NewSubscriptionGroupedAllocationPrice, @@ -810,6 +820,8 @@ module Orb Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::NewSubscriptionCumulativeGroupedBulkPrice, Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance, Orb::NewSubscriptionMinimumCompositePrice, Orb::SubscriptionCreateParams::AddPrice::Price::Percent, Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput @@ -1288,11 +1300,11 @@ module Orb end end - class TieredWithProration < Orb::Internal::Type::BaseModel + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Internal::AnyHash ) end @@ -1300,7 +1312,7 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol ) end attr_accessor :cadence @@ -1309,29 +1321,29 @@ module Orb sig { returns(String) } attr_accessor :item_id - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_proration pricing + # Configuration for matrix_with_threshold_discounts pricing sig do returns( - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig ) end - attr_reader :tiered_with_proration_config + attr_reader :matrix_with_threshold_discounts_config sig do params( - tiered_with_proration_config: - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + matrix_with_threshold_discounts_config: + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash ).void end - attr_writer :tiered_with_proration_config + attr_writer :matrix_with_threshold_discounts_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -1434,11 +1446,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, + matrix_with_threshold_discounts_config: + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash, name: String, - tiered_with_proration_config: - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1470,10 +1482,10 @@ module Orb cadence:, # The id of the item the price will be associated with. item_id:, + # Configuration for matrix_with_threshold_discounts pricing + matrix_with_threshold_discounts_config:, # The name of the price. name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -1512,7 +1524,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered_with_proration + model_type: :matrix_with_threshold_discounts ) end @@ -1520,12 +1532,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, + matrix_with_threshold_discounts_config: + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, model_type: Symbol, name: String, - tiered_with_proration_config: - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1563,7 +1575,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -1571,38 +1583,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ] ) end @@ -1610,48 +1622,100 @@ module Orb end end - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, Orb::Internal::AnyHash ) end - # Tiers for rating based on total usage quantities into the specified tier with - # proration + # Unit price used for usage that does not match any defined matrix cell. + sig { returns(String) } + attr_accessor :default_unit_amount + + # First matrix dimension key. + sig { returns(String) } + attr_accessor :first_dimension + + # Per-cell unit prices. sig do returns( T::Array[ - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue ] ) end - attr_accessor :tiers + attr_accessor :matrix_values + + # Optional second matrix dimension key. + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension + + sig do + returns( + T.nilable( + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + ) + ) + end + attr_reader :threshold_discount_groups - # Configuration for tiered_with_proration pricing sig do params( - tiers: + threshold_discount_groups: T::Array[ - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).void + end + attr_writer :threshold_discount_groups + + # Configuration for matrix_with_threshold_discounts pricing + sig do + params( + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash ] ).returns(T.attached_class) end def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: + # Unit price used for usage that does not match any defined matrix cell. + default_unit_amount:, + # First matrix dimension key. + first_dimension:, + # Per-cell unit prices. + matrix_values:, + # Optional second matrix dimension key. + second_dimension: nil, + threshold_discount_groups: nil ) end sig do override.returns( { - tiers: + default_unit_amount: String, + first_dimension: String, + matrix_values: T::Array[ - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup ] } ) @@ -1659,40 +1723,114 @@ module Orb def to_hash end - class Tier < Orb::Internal::Type::BaseModel + class MatrixValue < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue, Orb::Internal::AnyHash ) end - # Inclusive tier starting value sig { returns(String) } - attr_accessor :tier_lower_bound + attr_accessor :first_dimension_value - # Amount per unit sig { returns(String) } attr_accessor :unit_amount - # Configuration for a single tiered with proration tier + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension_value + sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class + params( + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + first_dimension_value:, + unit_amount:, + second_dimension_value: nil + ) + end + + sig do + override.returns( + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + } ) end + def to_hash + end + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup, + Orb::Internal::AnyHash + ) + end + + # Discount rate applied to spend above the threshold. + sig { returns(String) } + attr_accessor :above_threshold_discount_percentage + + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + sig { returns(String) } + attr_accessor :below_threshold_discount_percentage + + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + sig { returns(String) } + attr_accessor :cell_coordinates + + sig { returns(String) } + attr_accessor :threshold_amount + + sig { returns(T.nilable(String)) } + attr_accessor :description + + sig do + params( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + ).returns(T.attached_class) + end def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: + # Discount rate applied to spend above the threshold. + above_threshold_discount_percentage:, + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + below_threshold_discount_percentage:, + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + cell_coordinates:, + threshold_amount:, + description: nil ) end sig do override.returns( - { tier_lower_bound: String, unit_amount: String } + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + } ) end def to_hash @@ -1701,11 +1839,11 @@ module Orb end end - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + class TieredWithProration < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration, Orb::Internal::AnyHash ) end @@ -1713,27 +1851,11 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for grouped_with_min_max_thresholds pricing - sig do - returns( - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - ) - end - attr_reader :grouped_with_min_max_thresholds_config - - sig do - params( - grouped_with_min_max_thresholds_config: - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash - ).void - end - attr_writer :grouped_with_min_max_thresholds_config - # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -1746,6 +1868,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for tiered_with_proration pricing + sig do + returns( + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig + ) + end + attr_reader :tiered_with_proration_config + + sig do + params( + tiered_with_proration_config: + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + ).void + end + attr_writer :tiered_with_proration_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -1847,11 +1985,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, name: String, + tiered_with_proration_config: + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1881,12 +2019,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, + # Configuration for tiered_with_proration pricing + tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -1925,7 +2063,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :grouped_with_min_max_thresholds + model_type: :tiered_with_proration ) end @@ -1933,12 +2071,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, model_type: Symbol, name: String, + tiered_with_proration_config: + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1976,7 +2114,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -1984,38 +2122,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ] ) end @@ -2023,72 +2161,102 @@ module Orb end end - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, Orb::Internal::AnyHash ) end - # The event property used to group before applying thresholds - sig { returns(String) } - attr_accessor :grouping_key - - # The maximum amount to charge each group - sig { returns(String) } - attr_accessor :maximum_charge - - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge - - # The base price charged per group - sig { returns(String) } - attr_accessor :per_unit_rate + # Tiers for rating based on total usage quantities into the specified tier with + # proration + sig do + returns( + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] + ) + end + attr_accessor :tiers - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for tiered_with_proration pricing sig do params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + tiers: + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash + ] ).returns(T.attached_class) end def self.new( - # The event property used to group before applying thresholds - grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: + # Tiers for rating based on total usage quantities into the specified tier with + # proration + tiers: ) end sig do override.returns( { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + tiers: + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] } ) end def to_hash end + + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, + Orb::Internal::AnyHash + ) + end + + # Inclusive tier starting value + sig { returns(String) } + attr_accessor :tier_lower_bound + + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount + + # Configuration for a single tiered with proration tier + sig do + params(tier_lower_bound: String, unit_amount: String).returns( + T.attached_class + ) + end + def self.new( + # Inclusive tier starting value + tier_lower_bound:, + # Amount per unit + unit_amount: + ) + end + + sig do + override.returns( + { tier_lower_bound: String, unit_amount: String } + ) + end + def to_hash + end + end end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Internal::AnyHash ) end @@ -2096,26 +2264,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for cumulative_grouped_allocation pricing + # Configuration for grouped_with_min_max_thresholds pricing sig do returns( - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig ) end - attr_reader :cumulative_grouped_allocation_config + attr_reader :grouped_with_min_max_thresholds_config sig do params( - cumulative_grouped_allocation_config: - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + grouped_with_min_max_thresholds_config: + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash ).void end - attr_writer :cumulative_grouped_allocation_config + attr_writer :grouped_with_min_max_thresholds_config # The id of the item the price will be associated with. sig { returns(String) } @@ -2230,9 +2398,9 @@ module Orb sig do params( cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -2264,8 +2432,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, + # Configuration for grouped_with_min_max_thresholds pricing + grouped_with_min_max_thresholds_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -2308,7 +2476,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :cumulative_grouped_allocation + model_type: :grouped_with_min_max_thresholds ) end @@ -2316,9 +2484,9 @@ module Orb override.returns( { cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, model_type: Symbol, name: String, @@ -2359,7 +2527,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2367,38 +2535,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ] ) end @@ -2406,59 +2574,59 @@ module Orb end end - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::SubscriptionCreateParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, Orb::Internal::AnyHash ) end - # The overall allocation across all groups + # The event property used to group before applying thresholds sig { returns(String) } - attr_accessor :cumulative_allocation + attr_accessor :grouping_key - # The allocation per individual group + # The maximum amount to charge each group sig { returns(String) } - attr_accessor :group_allocation + attr_accessor :maximum_charge - # The event property used to group usage before applying allocations + # The minimum amount to charge each group, regardless of usage sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :minimum_charge - # The amount to charge for each unit outside of the allocation + # The base price charged per group sig { returns(String) } - attr_accessor :unit_amount + attr_accessor :per_unit_rate - # Configuration for cumulative_grouped_allocation pricing + # Configuration for grouped_with_min_max_thresholds pricing sig do params( - cumulative_allocation: String, - group_allocation: String, grouping_key: String, - unit_amount: String + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String ).returns(T.attached_class) end def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations + # The event property used to group before applying thresholds grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: + # The maximum amount to charge each group + maximum_charge:, + # The minimum amount to charge each group, regardless of usage + minimum_charge:, + # The base price charged per group + per_unit_rate: ) end sig do override.returns( { - cumulative_allocation: String, - group_allocation: String, grouping_key: String, - unit_amount: String + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } ) end @@ -2467,11 +2635,11 @@ module Orb end end - class Percent < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::Percent, + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Internal::AnyHash ) end @@ -2479,11 +2647,27 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::OrSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol ) end attr_accessor :cadence + # Configuration for cumulative_grouped_allocation pricing + sig do + returns( + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + ) + end + attr_reader :cumulative_grouped_allocation_config + + sig do + params( + cumulative_grouped_allocation_config: + Orb::SubscriptionCreateParams::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 @@ -2496,22 +2680,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for percent pricing - sig do - returns( - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig - ) - end - attr_reader :percent_config - - sig do - params( - percent_config: - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig::OrHash - ).void - end - attr_writer :percent_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -2613,11 +2781,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, item_id: String, name: String, - percent_config: - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2647,12 +2815,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for cumulative_grouped_allocation pricing + cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, - # Configuration for percent pricing - percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -2691,7 +2859,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :percent + model_type: :cumulative_grouped_allocation ) end @@ -2699,12 +2867,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, model_type: Symbol, name: String, - percent_config: - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2742,7 +2910,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2750,38 +2918,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ] ) end @@ -2789,65 +2957,99 @@ module Orb end end - class PercentConfig < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig, + Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, 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 + # The overall allocation across all groups + sig { returns(String) } + attr_accessor :cumulative_allocation - sig { override.returns({ percent: Float }) } - def to_hash - end - end - end + # The allocation per individual group + sig { returns(String) } + attr_accessor :group_allocation - class EventOutput < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput, - Orb::Internal::AnyHash - ) - end + # The event property used to group usage before applying allocations + sig { returns(String) } + attr_accessor :grouping_key - # The cadence to bill for this price on. + # 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 DailyCreditAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for event_output pricing + # Configuration for daily_credit_allowance pricing sig do returns( - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig ) end - attr_reader :event_output_config + attr_reader :daily_credit_allowance_config sig do params( - event_output_config: - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash + daily_credit_allowance_config: + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash ).void end - attr_writer :event_output_config + attr_writer :daily_credit_allowance_config # The id of the item the price will be associated with. sig { returns(String) } @@ -2962,9 +3164,9 @@ module Orb sig do params( cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -2996,8 +3198,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for event_output pricing - event_output_config:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -3040,7 +3242,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :event_output + model_type: :daily_credit_allowance ) end @@ -3048,9 +3250,9 @@ module Orb override.returns( { cadence: - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, model_type: Symbol, name: String, @@ -3091,7 +3293,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3099,38 +3301,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -3138,575 +3340,3230 @@ module Orb end end - class EventOutputConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # The key in the event data to extract the unit rate from. + # Credits granted per day. Lose-it-or-use-it; does not roll over. sig { returns(String) } - attr_accessor :unit_rating_key + attr_accessor :daily_allowance - # 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 + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + sig { returns(String) } + attr_accessor :default_unit_amount - # 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 + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions - # Configuration for event_output pricing + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + sig { returns(String) } + attr_accessor :event_day_property + + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing sig do params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] ).returns(T.attached_class) end def self.new( - # The 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 + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end sig do override.returns( { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] } ) end def to_hash end - end - end - sig do - override.returns( - T::Array[Orb::SubscriptionCreateParams::AddPrice::Price::Variants] - ) - end - def self.variants - end - end - end + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end - module ExternalMarketplace - extend Orb::Internal::Type::Enum + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values - TaggedSymbol = - T.type_alias do - T.all(Symbol, Orb::SubscriptionCreateParams::ExternalMarketplace) + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end + end end - OrSymbol = T.type_alias { T.any(Symbol, String) } - GOOGLE = - T.let( - :google, - Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol - ) - AWS = - T.let( - :aws, - Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol - ) - AZURE = - T.let( - :azure, - Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol - ) + class MeteredAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance, + Orb::Internal::AnyHash + ) + end - sig do - override.returns( - T::Array[ - Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol - ] - ) - end - def self.values - end - end + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol + ) + end + attr_accessor :cadence - class RemoveAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::RemoveAdjustment, - Orb::Internal::AnyHash - ) - end + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id - # The id of the adjustment to remove on the subscription. - sig { returns(String) } - attr_accessor :adjustment_id + # Configuration for metered_allowance pricing + sig do + returns( + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig + ) + end + attr_reader :metered_allowance_config - sig { params(adjustment_id: String).returns(T.attached_class) } - def self.new( - # The id of the adjustment to remove on the subscription. - adjustment_id: - ) - end + sig do + params( + metered_allowance_config: + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash + ).void + end + attr_writer :metered_allowance_config - sig { override.returns({ adjustment_id: String }) } - def to_hash - end - end + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type - class RemovePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::RemovePrice, - Orb::Internal::AnyHash - ) - end + # The name of the price. + sig { returns(String) } + attr_accessor :name - # The external price id of the price to remove on the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id - # The id of the price to remove on the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :price_id + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance - sig do - params( - external_price_id: T.nilable(String), - price_id: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The external price id of the price to remove on the subscription. - external_price_id: nil, - # The id of the price to remove on the subscription. - price_id: nil - ) - end - - sig do - override.returns( - { - external_price_id: T.nilable(String), - price_id: T.nilable(String) - } - ) - end - def to_hash - end - end - - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::ReplaceAdjustment, - Orb::Internal::AnyHash - ) - end - - # The definition of a new adjustment to create and add to the subscription. - sig do - returns( - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) - ) - end - attr_accessor :adjustment - - # The id of the adjustment on the plan to replace in the subscription. - sig { returns(String) } - attr_accessor :replaces_adjustment_id - - sig do - params( - adjustment: - T.any( - Orb::NewPercentageDiscount::OrHash, - Orb::NewUsageDiscount::OrHash, - Orb::NewAmountDiscount::OrHash, - Orb::NewMinimum::OrHash, - Orb::NewMaximum::OrHash - ), - replaces_adjustment_id: String - ).returns(T.attached_class) - end - def self.new( - # The definition of a new adjustment to create and add to the subscription. - adjustment:, - # The id of the adjustment on the plan to replace in the subscription. - replaces_adjustment_id: - ) - end + # For custom cadence: 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( - { - adjustment: - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ), - replaces_adjustment_id: String - } - ) - end - def to_hash - 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 subscription. - module Adjustment - extend Orb::Internal::Type::Union + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate - Variants = - T.type_alias do - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) ) end + attr_accessor :conversion_rate_config - sig do - override.returns( - T::Array[ - Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Variants - ] - ) - end - def self.variants - end - end - end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency - class ReplacePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::ReplacePrice, - Orb::Internal::AnyHash - ) - end + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration - # The id of the price on the plan to replace in the subscription. - sig { returns(String) } - attr_accessor :replaces_price_id + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration - # The definition of a new allocation price to create and add to the subscription. - sig { returns(T.nilable(Orb::NewAllocationPrice)) } - attr_reader :allocation_price + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id - sig do - params( - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) - ).void - end - attr_writer :allocation_price + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity - # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the - # replacement price. - sig { returns(T.nilable(T::Array[Orb::DiscountOverride])) } - attr_accessor :discounts + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key - # The external price id of the price to add to the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration - # The new quantity of the price, if the price is a fixed price. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration - # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for - # the replacement price. - sig { returns(T.nilable(String)) } - attr_accessor :maximum_amount + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id - # Override values for parameterized billable metric variables. Keys are parameter - # names, values are the override values. - sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } - attr_accessor :metric_parameter_overrides + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata - # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for - # the replacement price. - sig { returns(T.nilable(String)) } - attr_accessor :minimum_amount + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id - # New subscription price request body params. - sig do - returns( - T.nilable( - T.any( - Orb::NewSubscriptionUnitPrice, - Orb::NewSubscriptionTieredPrice, - Orb::NewSubscriptionBulkPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewSubscriptionPackagePrice, - Orb::NewSubscriptionMatrixPrice, - Orb::NewSubscriptionThresholdTotalAmountPrice, - Orb::NewSubscriptionTieredPackagePrice, - Orb::NewSubscriptionTieredWithMinimumPrice, - Orb::NewSubscriptionGroupedTieredPrice, - Orb::NewSubscriptionTieredPackageWithMinimumPrice, - Orb::NewSubscriptionPackageWithAllocationPrice, - Orb::NewSubscriptionUnitWithPercentPrice, - Orb::NewSubscriptionMatrixWithAllocationPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, - Orb::NewSubscriptionUnitWithProrationPrice, - Orb::NewSubscriptionGroupedAllocationPrice, - Orb::NewSubscriptionBulkWithProrationPrice, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::NewSubscriptionGroupedTieredPackagePrice, - Orb::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::NewSubscriptionMinimumCompositePrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent, - Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput - ) + sig do + params( + cadence: + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, + item_id: String, + metered_allowance_config: + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :metered_allowance ) - ) - end - attr_accessor :price + end - # The id of the price to add to the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :price_id + sig do + override.returns( + { + cadence: + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, + item_id: String, + metered_allowance_config: + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end - sig do - params( - replaces_price_id: String, - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), - discounts: T.nilable(T::Array[Orb::DiscountOverride::OrHash]), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - maximum_amount: T.nilable(String), - metric_parameter_overrides: T.nilable(T::Hash[Symbol, T.anything]), - minimum_amount: T.nilable(String), - price: - T.nilable( + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + Orb::Internal::AnyHash + ) + end + + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + sig { returns(String) } + attr_accessor :allowance_grouping_value + + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + sig { returns(String) } + attr_accessor :consumption_grouping_value + + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + sig { returns(String) } + attr_accessor :grouping_key + + # Per-unit price applied to gross consumption and to the allowance credit. + sig { returns(String) } + attr_accessor :unit_amount + + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing + sig do + params( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + ).returns(T.attached_class) + end + def self.new( + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + grouping_key:, + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil + ) + end + + sig do + override.returns( + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + ) + end + def to_hash + end + end + end + + class Percent < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do T.any( - Orb::NewSubscriptionUnitPrice::OrHash, - Orb::NewSubscriptionTieredPrice::OrHash, - Orb::NewSubscriptionBulkPrice::OrHash, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::OrHash, - Orb::NewSubscriptionPackagePrice::OrHash, - Orb::NewSubscriptionMatrixPrice::OrHash, - Orb::NewSubscriptionThresholdTotalAmountPrice::OrHash, - Orb::NewSubscriptionTieredPackagePrice::OrHash, - Orb::NewSubscriptionTieredWithMinimumPrice::OrHash, - Orb::NewSubscriptionGroupedTieredPrice::OrHash, - Orb::NewSubscriptionTieredPackageWithMinimumPrice::OrHash, - Orb::NewSubscriptionPackageWithAllocationPrice::OrHash, - Orb::NewSubscriptionUnitWithPercentPrice::OrHash, - Orb::NewSubscriptionMatrixWithAllocationPrice::OrHash, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::OrHash, - Orb::NewSubscriptionUnitWithProrationPrice::OrHash, - Orb::NewSubscriptionGroupedAllocationPrice::OrHash, - Orb::NewSubscriptionBulkWithProrationPrice::OrHash, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice::OrHash, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice::OrHash, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::OrHash, - Orb::NewSubscriptionMatrixWithDisplayNamePrice::OrHash, - Orb::NewSubscriptionGroupedTieredPackagePrice::OrHash, - Orb::NewSubscriptionMaxGroupTieredPackagePrice::OrHash, + Orb::SubscriptionCreateParams::AddPrice::Price::Percent, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionCreateParams::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::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig + ) + end + attr_reader :percent_config + + sig do + params( + percent_config: + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig::OrHash + ).void + end + attr_writer :percent_config + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + sig do + params( + cadence: + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::OrSymbol, + item_id: String, + name: String, + percent_config: + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig::OrHash, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_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::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::OrSymbol, + item_id: String, + model_type: Symbol, + name: String, + percent_config: + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionCreateParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionCreateParams::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::SubscriptionCreateParams::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::SubscriptionCreateParams::AddPrice::Price::EventOutput, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # Configuration for event_output pricing + sig do + returns( + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig + ) + end + attr_reader :event_output_config + + sig do + params( + event_output_config: + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash + ).void + end + attr_writer :event_output_config + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # 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::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # Configuration for event_output pricing + event_output_config:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :event_output + ) + end + + sig do + override.returns( + { + cadence: + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class EventOutputConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::Internal::AnyHash + ) + end + + # The key in the event data to extract the unit rate from. + sig { returns(String) } + attr_accessor :unit_rating_key + + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + sig { returns(T.nilable(String)) } + attr_accessor :default_unit_rate + + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + sig { returns(T.nilable(String)) } + attr_accessor :grouping_key + + # Configuration for event_output pricing + sig do + params( + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The key in the event data to extract the unit rate from. + unit_rating_key:, + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + default_unit_rate: nil, + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + grouping_key: nil + ) + end + + sig do + override.returns( + { + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + sig do + override.returns( + T::Array[Orb::SubscriptionCreateParams::AddPrice::Price::Variants] + ) + end + def self.variants + end + end + end + + module ExternalMarketplace + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Orb::SubscriptionCreateParams::ExternalMarketplace) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + GOOGLE = + T.let( + :google, + Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol + ) + AWS = + T.let( + :aws, + Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol + ) + AZURE = + T.let( + :azure, + Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionCreateParams::ExternalMarketplace::TaggedSymbol + ] + ) + end + def self.values + end + end + + class RemoveAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::RemoveAdjustment, + Orb::Internal::AnyHash + ) + end + + # The id of the adjustment to remove on the subscription. + sig { returns(String) } + attr_accessor :adjustment_id + + sig { params(adjustment_id: String).returns(T.attached_class) } + def self.new( + # The id of the adjustment to remove on the subscription. + adjustment_id: + ) + end + + sig { override.returns({ adjustment_id: String }) } + def to_hash + end + end + + class RemovePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::RemovePrice, + Orb::Internal::AnyHash + ) + end + + # The external price id of the price to remove on the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # The id of the price to remove on the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :price_id + + sig do + params( + external_price_id: T.nilable(String), + price_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The external price id of the price to remove on the subscription. + external_price_id: nil, + # The id of the price to remove on the subscription. + price_id: nil + ) + end + + sig do + override.returns( + { + external_price_id: T.nilable(String), + price_id: T.nilable(String) + } + ) + end + def to_hash + end + end + + class ReplaceAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplaceAdjustment, + Orb::Internal::AnyHash + ) + end + + # The definition of a new adjustment to create and add to the subscription. + sig do + returns( + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ) + ) + end + attr_accessor :adjustment + + # The id of the adjustment on the plan to replace in the subscription. + sig { returns(String) } + attr_accessor :replaces_adjustment_id + + sig do + params( + adjustment: + T.any( + Orb::NewPercentageDiscount::OrHash, + Orb::NewUsageDiscount::OrHash, + Orb::NewAmountDiscount::OrHash, + Orb::NewMinimum::OrHash, + Orb::NewMaximum::OrHash + ), + replaces_adjustment_id: String + ).returns(T.attached_class) + end + def self.new( + # The definition of a new adjustment to create and add to the subscription. + adjustment:, + # The id of the adjustment on the plan to replace in the subscription. + replaces_adjustment_id: + ) + end + + sig do + override.returns( + { + adjustment: + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ), + replaces_adjustment_id: String + } + ) + end + def to_hash + end + + # The definition of a new adjustment to create and add to the subscription. + module Adjustment + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ) + end + + sig do + override.returns( + T::Array[ + Orb::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::Variants + ] + ) + end + def self.variants + end + end + end + + class ReplacePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice, + Orb::Internal::AnyHash + ) + end + + # The id of the price on the plan to replace in the subscription. + sig { returns(String) } + attr_accessor :replaces_price_id + + # The definition of a new allocation price to create and add to the subscription. + sig { returns(T.nilable(Orb::NewAllocationPrice)) } + attr_reader :allocation_price + + sig do + params( + allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) + ).void + end + attr_writer :allocation_price + + # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the + # replacement price. + sig { returns(T.nilable(T::Array[Orb::DiscountOverride])) } + attr_accessor :discounts + + # The external price id of the price to add to the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # The new quantity of the price, if the price is a fixed price. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for + # the replacement price. + sig { returns(T.nilable(String)) } + attr_accessor :maximum_amount + + # Override values for parameterized billable metric variables. Keys are parameter + # names, values are the override values. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metric_parameter_overrides + + # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for + # the replacement price. + sig { returns(T.nilable(String)) } + attr_accessor :minimum_amount + + # New subscription price request body params. + sig do + returns( + T.nilable( + T.any( + Orb::NewSubscriptionUnitPrice, + Orb::NewSubscriptionTieredPrice, + Orb::NewSubscriptionBulkPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewSubscriptionPackagePrice, + Orb::NewSubscriptionMatrixPrice, + Orb::NewSubscriptionThresholdTotalAmountPrice, + Orb::NewSubscriptionTieredPackagePrice, + Orb::NewSubscriptionTieredWithMinimumPrice, + Orb::NewSubscriptionGroupedTieredPrice, + Orb::NewSubscriptionTieredPackageWithMinimumPrice, + Orb::NewSubscriptionPackageWithAllocationPrice, + Orb::NewSubscriptionUnitWithPercentPrice, + Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, + Orb::NewSubscriptionUnitWithProrationPrice, + Orb::NewSubscriptionGroupedAllocationPrice, + Orb::NewSubscriptionBulkWithProrationPrice, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::NewSubscriptionGroupedTieredPackagePrice, + Orb::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewSubscriptionMinimumCompositePrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent, + Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput + ) + ) + ) + end + attr_accessor :price + + # The id of the price to add to the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :price_id + + sig do + params( + replaces_price_id: String, + allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), + discounts: T.nilable(T::Array[Orb::DiscountOverride::OrHash]), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + maximum_amount: T.nilable(String), + metric_parameter_overrides: T.nilable(T::Hash[Symbol, T.anything]), + minimum_amount: T.nilable(String), + price: + T.nilable( + T.any( + Orb::NewSubscriptionUnitPrice::OrHash, + Orb::NewSubscriptionTieredPrice::OrHash, + Orb::NewSubscriptionBulkPrice::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::OrHash, + Orb::NewSubscriptionPackagePrice::OrHash, + Orb::NewSubscriptionMatrixPrice::OrHash, + Orb::NewSubscriptionThresholdTotalAmountPrice::OrHash, + Orb::NewSubscriptionTieredPackagePrice::OrHash, + Orb::NewSubscriptionTieredWithMinimumPrice::OrHash, + Orb::NewSubscriptionGroupedTieredPrice::OrHash, + Orb::NewSubscriptionTieredPackageWithMinimumPrice::OrHash, + Orb::NewSubscriptionPackageWithAllocationPrice::OrHash, + Orb::NewSubscriptionUnitWithPercentPrice::OrHash, + Orb::NewSubscriptionMatrixWithAllocationPrice::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::OrHash, + Orb::NewSubscriptionUnitWithProrationPrice::OrHash, + Orb::NewSubscriptionGroupedAllocationPrice::OrHash, + Orb::NewSubscriptionBulkWithProrationPrice::OrHash, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice::OrHash, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::OrHash, + Orb::NewSubscriptionMatrixWithDisplayNamePrice::OrHash, + Orb::NewSubscriptionGroupedTieredPackagePrice::OrHash, + Orb::NewSubscriptionMaxGroupTieredPackagePrice::OrHash, Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice::OrHash, Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice::OrHash, Orb::NewSubscriptionCumulativeGroupedBulkPrice::OrHash, Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::OrHash, Orb::NewSubscriptionMinimumCompositePrice::OrHash, Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent::OrHash, Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput::OrHash ) - ), - price_id: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The id of the price on the plan to replace in the subscription. - replaces_price_id:, - # The definition of a new allocation price to create and add to the subscription. - allocation_price: nil, - # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the - # replacement price. - discounts: nil, - # The external price id of the price to add to the subscription. - external_price_id: nil, - # The new quantity of the price, if the price is a fixed price. - fixed_price_quantity: nil, - # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for - # the replacement price. - maximum_amount: nil, - # Override values for parameterized billable metric variables. Keys are parameter - # names, values are the override values. - metric_parameter_overrides: nil, - # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for - # the replacement price. - minimum_amount: nil, - # New subscription price request body params. - price: nil, - # The id of the price to add to the subscription. - price_id: nil - ) - end + ), + price_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The id of the price on the plan to replace in the subscription. + replaces_price_id:, + # The definition of a new allocation price to create and add to the subscription. + allocation_price: nil, + # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the + # replacement price. + discounts: nil, + # The external price id of the price to add to the subscription. + external_price_id: nil, + # The new quantity of the price, if the price is a fixed price. + fixed_price_quantity: nil, + # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for + # the replacement price. + maximum_amount: nil, + # Override values for parameterized billable metric variables. Keys are parameter + # names, values are the override values. + metric_parameter_overrides: nil, + # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for + # the replacement price. + minimum_amount: nil, + # New subscription price request body params. + price: nil, + # The id of the price to add to the subscription. + price_id: nil + ) + end + + sig do + override.returns( + { + replaces_price_id: String, + allocation_price: T.nilable(Orb::NewAllocationPrice), + discounts: T.nilable(T::Array[Orb::DiscountOverride]), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + maximum_amount: T.nilable(String), + metric_parameter_overrides: + T.nilable(T::Hash[Symbol, T.anything]), + minimum_amount: T.nilable(String), + price: + T.nilable( + T.any( + Orb::NewSubscriptionUnitPrice, + Orb::NewSubscriptionTieredPrice, + Orb::NewSubscriptionBulkPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewSubscriptionPackagePrice, + Orb::NewSubscriptionMatrixPrice, + Orb::NewSubscriptionThresholdTotalAmountPrice, + Orb::NewSubscriptionTieredPackagePrice, + Orb::NewSubscriptionTieredWithMinimumPrice, + Orb::NewSubscriptionGroupedTieredPrice, + Orb::NewSubscriptionTieredPackageWithMinimumPrice, + Orb::NewSubscriptionPackageWithAllocationPrice, + Orb::NewSubscriptionUnitWithPercentPrice, + Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, + Orb::NewSubscriptionUnitWithProrationPrice, + Orb::NewSubscriptionGroupedAllocationPrice, + Orb::NewSubscriptionBulkWithProrationPrice, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::NewSubscriptionGroupedTieredPackagePrice, + Orb::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewSubscriptionMinimumCompositePrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent, + Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput + ) + ), + price_id: T.nilable(String) + } + ) + end + def to_hash + end + + # New subscription price request body params. + module Price + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewSubscriptionUnitPrice, + Orb::NewSubscriptionTieredPrice, + Orb::NewSubscriptionBulkPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewSubscriptionPackagePrice, + Orb::NewSubscriptionMatrixPrice, + Orb::NewSubscriptionThresholdTotalAmountPrice, + Orb::NewSubscriptionTieredPackagePrice, + Orb::NewSubscriptionTieredWithMinimumPrice, + Orb::NewSubscriptionGroupedTieredPrice, + Orb::NewSubscriptionTieredPackageWithMinimumPrice, + Orb::NewSubscriptionPackageWithAllocationPrice, + Orb::NewSubscriptionUnitWithPercentPrice, + Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, + Orb::NewSubscriptionUnitWithProrationPrice, + Orb::NewSubscriptionGroupedAllocationPrice, + Orb::NewSubscriptionBulkWithProrationPrice, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::NewSubscriptionGroupedTieredPackagePrice, + Orb::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewSubscriptionMinimumCompositePrice, + Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent, + Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput + ) + end + + class BulkWithFilters < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, + Orb::Internal::AnyHash + ) + end + + # Configuration for bulk_with_filters pricing + sig do + returns( + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig + ) + end + attr_reader :bulk_with_filters_config + + sig do + params( + bulk_with_filters_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash + ).void + end + attr_writer :bulk_with_filters_config + + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + sig do + params( + bulk_with_filters_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, + cadence: + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # Configuration for bulk_with_filters pricing + bulk_with_filters_config:, + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :bulk_with_filters + ) + end + + sig do + override.returns( + { + bulk_with_filters_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::Internal::AnyHash + ) + end + + # Property filters to apply (all must match) + sig do + returns( + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ] + ) + end + attr_accessor :filters + + # Bulk tiers for rating based on total usage volume + sig do + returns( + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + ) + end + attr_accessor :tiers + + # Configuration for bulk_with_filters pricing + sig do + params( + filters: + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash + ], + tiers: + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Property filters to apply (all must match) + filters:, + # Bulk tiers for rating based on total usage volume + tiers: + ) + end + + sig do + override.returns( + { + filters: + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ], + tiers: + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + } + ) + end + def to_hash + end + + class Filter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::Internal::AnyHash + ) + end + + # Event property key to filter on + sig { returns(String) } + attr_accessor :property_key + + # Event property value to match + sig { returns(String) } + attr_accessor :property_value + + # Configuration for a single property filter + sig do + params(property_key: String, property_value: String).returns( + T.attached_class + ) + end + def self.new( + # Event property key to filter on + property_key:, + # Event property value to match + property_value: + ) + end + + sig do + override.returns( + { property_key: String, property_value: String } + ) + end + def to_hash + end + end + + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, + Orb::Internal::AnyHash + ) + end + + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount + + # The lower bound for this tier + sig { returns(T.nilable(String)) } + attr_accessor :tier_lower_bound + + # Configuration for a single bulk pricing tier + sig do + params( + unit_amount: String, + tier_lower_bound: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Amount per unit + unit_amount:, + # The lower bound for this tier + tier_lower_bound: nil + ) + end + + sig do + override.returns( + { unit_amount: String, tier_lower_bound: T.nilable(String) } + ) + end + def to_hash + end + end + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for matrix_with_threshold_discounts pricing + sig do + returns( + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + ) + end + attr_reader :matrix_with_threshold_discounts_config + + sig do + params( + matrix_with_threshold_discounts_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash + ).void + end + attr_writer :matrix_with_threshold_discounts_config + + # The pricing model type + sig { returns(Symbol) } + 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::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, + item_id: String, + matrix_with_threshold_discounts_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # Configuration for matrix_with_threshold_discounts pricing + matrix_with_threshold_discounts_config:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :matrix_with_threshold_discounts + ) + end + + sig do + override.returns( + { + cadence: + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, + item_id: String, + matrix_with_threshold_discounts_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + Orb::Internal::AnyHash + ) + end + + # Unit price used for usage that does not match any defined matrix cell. + sig { returns(String) } + attr_accessor :default_unit_amount + + # First matrix dimension key. + sig { returns(String) } + attr_accessor :first_dimension + + # Per-cell unit prices. + sig do + returns( + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Optional second matrix dimension key. + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension + + sig do + returns( + T.nilable( + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + ) + ) + end + attr_reader :threshold_discount_groups + + sig do + params( + threshold_discount_groups: + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).void + end + attr_writer :threshold_discount_groups + + # Configuration for matrix_with_threshold_discounts pricing + sig do + params( + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Unit price used for usage that does not match any defined matrix cell. + default_unit_amount:, + # First matrix dimension key. + first_dimension:, + # Per-cell unit prices. + matrix_values:, + # Optional second matrix dimension key. + second_dimension: nil, + threshold_discount_groups: nil + ) + end + + sig do + override.returns( + { + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :first_dimension_value + + sig { returns(String) } + attr_accessor :unit_amount + + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension_value + + sig do + params( + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + first_dimension_value:, + unit_amount:, + second_dimension_value: nil + ) + end + + sig do + override.returns( + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + } + ) + end + def to_hash + end + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup, + Orb::Internal::AnyHash + ) + end + + # Discount rate applied to spend above the threshold. + sig { returns(String) } + attr_accessor :above_threshold_discount_percentage + + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + sig { returns(String) } + attr_accessor :below_threshold_discount_percentage + + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + sig { returns(String) } + attr_accessor :cell_coordinates + + sig { returns(String) } + attr_accessor :threshold_amount + + sig { returns(T.nilable(String)) } + attr_accessor :description + + sig do + params( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Discount rate applied to spend above the threshold. + above_threshold_discount_percentage:, + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + below_threshold_discount_percentage:, + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + cell_coordinates:, + threshold_amount:, + description: nil + ) + end + + sig do + override.returns( + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + } + ) + end + def to_hash + end + end + end + end + + class TieredWithProration < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionCreateParams::ReplacePrice::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::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig + ) + end + attr_reader :tiered_with_proration_config + + sig do + params( + tiered_with_proration_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + ).void + end + attr_writer :tiered_with_proration_config + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + sig do + params( + cadence: + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, + item_id: String, + name: String, + tiered_with_proration_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_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::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, + item_id: String, + model_type: Symbol, + name: String, + tiered_with_proration_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) - sig do - override.returns( - { - replaces_price_id: String, - allocation_price: T.nilable(Orb::NewAllocationPrice), - discounts: T.nilable(T::Array[Orb::DiscountOverride]), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - maximum_amount: T.nilable(String), - metric_parameter_overrides: - T.nilable(T::Hash[Symbol, T.anything]), - minimum_amount: T.nilable(String), - price: - T.nilable( + sig do + override.returns( + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do T.any( - Orb::NewSubscriptionUnitPrice, - Orb::NewSubscriptionTieredPrice, - Orb::NewSubscriptionBulkPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewSubscriptionPackagePrice, - Orb::NewSubscriptionMatrixPrice, - Orb::NewSubscriptionThresholdTotalAmountPrice, - Orb::NewSubscriptionTieredPackagePrice, - Orb::NewSubscriptionTieredWithMinimumPrice, - Orb::NewSubscriptionGroupedTieredPrice, - Orb::NewSubscriptionTieredPackageWithMinimumPrice, - Orb::NewSubscriptionPackageWithAllocationPrice, - Orb::NewSubscriptionUnitWithPercentPrice, - Orb::NewSubscriptionMatrixWithAllocationPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, - Orb::NewSubscriptionUnitWithProrationPrice, - Orb::NewSubscriptionGroupedAllocationPrice, - Orb::NewSubscriptionBulkWithProrationPrice, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::NewSubscriptionGroupedTieredPackagePrice, - Orb::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::NewSubscriptionMinimumCompositePrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent, - Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, + Orb::Internal::AnyHash ) - ), - price_id: T.nilable(String) - } - ) - end - def to_hash - end + end - # New subscription price request body params. - module Price - extend Orb::Internal::Type::Union + # Tiers for rating based on total usage quantities into the specified tier with + # proration + sig do + returns( + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] + ) + end + attr_accessor :tiers - Variants = - T.type_alias do - T.any( - Orb::NewSubscriptionUnitPrice, - Orb::NewSubscriptionTieredPrice, - Orb::NewSubscriptionBulkPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewSubscriptionPackagePrice, - Orb::NewSubscriptionMatrixPrice, - Orb::NewSubscriptionThresholdTotalAmountPrice, - Orb::NewSubscriptionTieredPackagePrice, - Orb::NewSubscriptionTieredWithMinimumPrice, - Orb::NewSubscriptionGroupedTieredPrice, - Orb::NewSubscriptionTieredPackageWithMinimumPrice, - Orb::NewSubscriptionPackageWithAllocationPrice, - Orb::NewSubscriptionUnitWithPercentPrice, - Orb::NewSubscriptionMatrixWithAllocationPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, - Orb::NewSubscriptionUnitWithProrationPrice, - Orb::NewSubscriptionGroupedAllocationPrice, - Orb::NewSubscriptionBulkWithProrationPrice, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::NewSubscriptionGroupedTieredPackagePrice, - Orb::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::NewSubscriptionMinimumCompositePrice, - Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent, - Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput + # Configuration for tiered_with_proration pricing + sig do + params( + tiers: + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::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::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] + } + ) + end + def to_hash + end + + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, + Orb::Internal::AnyHash + ) + end + + # Inclusive tier starting value + sig { returns(String) } + attr_accessor :tier_lower_bound + + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount + + # Configuration for a single tiered with proration tier + sig do + params(tier_lower_bound: String, unit_amount: String).returns( + T.attached_class + ) + end + def self.new( + # Inclusive tier starting value + tier_lower_bound:, + # Amount per unit + unit_amount: + ) + end + + sig do + override.returns( + { tier_lower_bound: String, unit_amount: String } + ) + end + def to_hash + end + end end + end - class BulkWithFilters < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters, + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Internal::AnyHash ) end - # Configuration for bulk_with_filters pricing + # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol ) end - attr_reader :bulk_with_filters_config - - sig do - params( - bulk_with_filters_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void - end - attr_writer :bulk_with_filters_config + attr_accessor :cadence - # The cadence to bill for this price on. + # Configuration for grouped_with_min_max_thresholds pricing sig do returns( - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig ) end - attr_accessor :cadence + attr_reader :grouped_with_min_max_thresholds_config + + sig do + params( + grouped_with_min_max_thresholds_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + ).void + end + attr_writer :grouped_with_min_max_thresholds_config # The id of the item the price will be associated with. sig { returns(String) } @@ -3820,10 +6677,10 @@ module Orb sig do params( - bulk_with_filters_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -3838,257 +6695,108 @@ module Orb Orb::TieredConversionRateConfig::OrHash ) ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_filters - ) - end - - sig do - override.returns( - { - bulk_with_filters_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash - ) - end - - # Property filters to apply (all must match) - sig do - returns( - T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - ) - end - attr_accessor :filters - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_filters pricing - sig do - params( - filters: - T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], - tiers: - T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - filters: - T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ], - tiers: - T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - } - ) - end - def to_hash - end - - class Filter < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, - Orb::Internal::AnyHash - ) - end - - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match - sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params(property_key: String, property_value: String).returns( - T.attached_class - ) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # The lower bound for this tier - sig { returns(T.nilable(String)) } - attr_accessor :tier_lower_bound - - # Configuration for a single bulk pricing tier - sig do - params( - unit_amount: String, - tier_lower_bound: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Amount per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil - ) - end + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_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( - { unit_amount: String, tier_lower_bound: T.nilable(String) } - ) - end - def to_hash - end - end + sig do + override.returns( + { + cadence: + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash end # The cadence to bill for this price on. @@ -4099,7 +6807,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -4107,51 +6815,111 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ] ) end def self.values end end + + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice::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 TieredWithProration < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration, + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Internal::AnyHash ) end @@ -4159,11 +6927,27 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol ) end attr_accessor :cadence + # Configuration for cumulative_grouped_allocation pricing + sig do + returns( + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + ) + end + attr_reader :cumulative_grouped_allocation_config + + sig do + params( + cumulative_grouped_allocation_config: + Orb::SubscriptionCreateParams::ReplacePrice::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 @@ -4176,22 +6960,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -4293,11 +7061,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, item_id: String, name: String, - tiered_with_proration_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4327,12 +7095,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for cumulative_grouped_allocation pricing + cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -4371,7 +7139,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered_with_proration + model_type: :cumulative_grouped_allocation ) end @@ -4379,12 +7147,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, model_type: Symbol, name: String, - tiered_with_proration_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4422,7 +7190,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -4430,38 +7198,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ] ) end @@ -4469,102 +7237,72 @@ module Orb end end - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, + Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, Orb::Internal::AnyHash ) end - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers + # The overall allocation across all groups + sig { returns(String) } + attr_accessor :cumulative_allocation - # Configuration for tiered_with_proration pricing + # 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( - tiers: - T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String ).returns(T.attached_class) end def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: + # The 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( { - tiers: - T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } ) end def to_hash end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end end end - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -4572,26 +7310,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for daily_credit_allowance pricing sig do returns( - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig ) end - attr_reader :grouped_with_min_max_thresholds_config + attr_reader :daily_credit_allowance_config sig do params( - grouped_with_min_max_thresholds_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + daily_credit_allowance_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash ).void end - attr_writer :grouped_with_min_max_thresholds_config + attr_writer :daily_credit_allowance_config # The id of the item the price will be associated with. sig { returns(String) } @@ -4706,9 +7444,9 @@ module Orb sig do params( cadence: - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -4740,8 +7478,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -4784,7 +7522,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :grouped_with_min_max_thresholds + model_type: :daily_credit_allowance ) end @@ -4792,9 +7530,9 @@ module Orb override.returns( { cadence: - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, model_type: Symbol, name: String, @@ -4835,7 +7573,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -4843,38 +7581,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -4882,72 +7620,144 @@ module Orb end end - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # The event property used to group before applying thresholds + # Credits granted per day. Lose-it-or-use-it; does not roll over. sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :daily_allowance - # The maximum amount to charge each group + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value sig { returns(String) } - attr_accessor :maximum_charge + attr_accessor :default_unit_amount - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions - # The base price charged per group + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. sig { returns(String) } - attr_accessor :per_unit_rate + attr_accessor :event_day_property - # Configuration for grouped_with_min_max_thresholds pricing + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing sig do params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] ).returns(T.attached_class) end def self.new( - # The 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: + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end sig do override.returns( { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] } ) end def to_hash end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance, Orb::Internal::AnyHash ) end @@ -4955,30 +7765,30 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for cumulative_grouped_allocation pricing + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for metered_allowance pricing sig do returns( - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig ) end - attr_reader :cumulative_grouped_allocation_config + attr_reader :metered_allowance_config sig do params( - cumulative_grouped_allocation_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + metered_allowance_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig::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 + attr_writer :metered_allowance_config # The pricing model type sig { returns(Symbol) } @@ -5089,10 +7899,10 @@ module Orb sig do params( cadence: - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -5123,10 +7933,10 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, # The name of the price. name:, # The id of the billable metric for the price. Only needed if the price is @@ -5167,7 +7977,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :cumulative_grouped_allocation + model_type: :metered_allowance ) end @@ -5175,10 +7985,10 @@ module Orb override.returns( { cadence: - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -5218,7 +8028,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -5226,38 +8036,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ] ) end @@ -5265,59 +8075,91 @@ module Orb end end - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, Orb::Internal::AnyHash ) end - # The overall allocation across all groups + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. sig { returns(String) } - attr_accessor :cumulative_allocation + attr_accessor :allowance_grouping_value - # The allocation per individual group + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. sig { returns(String) } - attr_accessor :group_allocation + attr_accessor :consumption_grouping_value - # The event property used to group usage before applying allocations + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. sig { returns(String) } attr_accessor :grouping_key - # The amount to charge for each unit outside of the allocation + # Per-unit price applied to gross consumption and to the allowance credit. sig { returns(String) } attr_accessor :unit_amount - # Configuration for cumulative_grouped_allocation pricing + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing sig do params( - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String ).returns(T.attached_class) end def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil ) end sig do override.returns( { - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } ) end diff --git a/rbi/orb/models/subscription_price_intervals_params.rbi b/rbi/orb/models/subscription_price_intervals_params.rbi index e970bbfc..e20ea87d 100644 --- a/rbi/orb/models/subscription_price_intervals_params.rbi +++ b/rbi/orb/models/subscription_price_intervals_params.rbi @@ -264,6 +264,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice, Orb::NewFloatingUnitWithPercentPrice, Orb::NewFloatingMatrixWithAllocationPrice, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts, Orb::NewFloatingTieredWithProrationPrice, Orb::NewFloatingUnitWithProrationPrice, Orb::NewFloatingGroupedAllocationPrice, @@ -278,6 +279,8 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::SubscriptionPriceIntervalsParams::Add::Price::EventOutput @@ -345,6 +348,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice::OrHash, Orb::NewFloatingUnitWithPercentPrice::OrHash, Orb::NewFloatingMatrixWithAllocationPrice::OrHash, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::OrHash, Orb::NewFloatingTieredWithProrationPrice::OrHash, Orb::NewFloatingUnitWithProrationPrice::OrHash, Orb::NewFloatingGroupedAllocationPrice::OrHash, @@ -359,6 +363,8 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice::OrHash, Orb::NewFloatingCumulativeGroupedBulkPrice::OrHash, Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::OrHash, + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::OrHash, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::OrHash, Orb::NewFloatingMinimumCompositePrice::OrHash, Orb::SubscriptionPriceIntervalsParams::Add::Price::Percent::OrHash, Orb::SubscriptionPriceIntervalsParams::Add::Price::EventOutput::OrHash @@ -462,6 +468,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice, Orb::NewFloatingUnitWithPercentPrice, Orb::NewFloatingMatrixWithAllocationPrice, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts, Orb::NewFloatingTieredWithProrationPrice, Orb::NewFloatingUnitWithProrationPrice, Orb::NewFloatingGroupedAllocationPrice, @@ -476,6 +483,8 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::SubscriptionPriceIntervalsParams::Add::Price::EventOutput @@ -723,6 +732,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice, Orb::NewFloatingUnitWithPercentPrice, Orb::NewFloatingMatrixWithAllocationPrice, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts, Orb::NewFloatingTieredWithProrationPrice, Orb::NewFloatingUnitWithProrationPrice, Orb::NewFloatingGroupedAllocationPrice, @@ -737,6 +747,8 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::NewFloatingCumulativeGroupedBulkPrice, Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance, Orb::NewFloatingMinimumCompositePrice, Orb::SubscriptionPriceIntervalsParams::Add::Price::Percent, Orb::SubscriptionPriceIntervalsParams::Add::Price::EventOutput @@ -1203,11 +1215,1280 @@ module Orb end end + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for matrix_with_threshold_discounts pricing + sig do + returns( + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + ) + end + attr_reader :matrix_with_threshold_discounts_config + + sig do + params( + matrix_with_threshold_discounts_config: + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash + ).void + end + attr_writer :matrix_with_threshold_discounts_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # An ISO 4217 currency string for which this price is billed in. + currency:, + # The id of the item the price will be associated with. + item_id:, + # Configuration for matrix_with_threshold_discounts pricing + matrix_with_threshold_discounts_config:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # The pricing model type + model_type: :matrix_with_threshold_discounts + ) + end + + sig do + override.returns( + { + cadence: + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + Orb::Internal::AnyHash + ) + end + + # Unit price used for usage that does not match any defined matrix cell. + sig { returns(String) } + attr_accessor :default_unit_amount + + # First matrix dimension key. + sig { returns(String) } + attr_accessor :first_dimension + + # Per-cell unit prices. + sig do + returns( + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Optional second matrix dimension key. + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension + + sig do + returns( + T.nilable( + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + ) + ) + end + attr_reader :threshold_discount_groups + + sig do + params( + threshold_discount_groups: + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).void + end + attr_writer :threshold_discount_groups + + # Configuration for matrix_with_threshold_discounts pricing + sig do + params( + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Unit price used for usage that does not match any defined matrix cell. + default_unit_amount:, + # First matrix dimension key. + first_dimension:, + # Per-cell unit prices. + matrix_values:, + # Optional second matrix dimension key. + second_dimension: nil, + threshold_discount_groups: nil + ) + end + + sig do + override.returns( + { + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :first_dimension_value + + sig { returns(String) } + attr_accessor :unit_amount + + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension_value + + sig do + params( + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + first_dimension_value:, + unit_amount:, + second_dimension_value: nil + ) + end + + sig do + override.returns( + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + } + ) + end + def to_hash + end + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup, + Orb::Internal::AnyHash + ) + end + + # Discount rate applied to spend above the threshold. + sig { returns(String) } + attr_accessor :above_threshold_discount_percentage + + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + sig { returns(String) } + attr_accessor :below_threshold_discount_percentage + + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + sig { returns(String) } + attr_accessor :cell_coordinates + + sig { returns(String) } + attr_accessor :threshold_amount + + sig { returns(T.nilable(String)) } + attr_accessor :description + + sig do + params( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Discount rate applied to spend above the threshold. + above_threshold_discount_percentage:, + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + below_threshold_discount_percentage:, + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + cell_coordinates:, + threshold_amount:, + description: nil + ) + end + + sig do + override.returns( + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + } + ) + end + def to_hash + end + end + end + end + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, + Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # Configuration for grouped_with_min_max_thresholds pricing + sig do + returns( + Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + ) + end + attr_reader :grouped_with_min_max_thresholds_config + + sig do + params( + grouped_with_min_max_thresholds_config: + Orb::SubscriptionPriceIntervalsParams::Add::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 + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + currency: String, + grouped_with_min_max_thresholds_config: + Orb::SubscriptionPriceIntervalsParams::Add::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 + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # An ISO 4217 currency string for which this price is billed in. + currency:, + # Configuration for 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( + { + cadence: + Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + currency: String, + grouped_with_min_max_thresholds_config: + Orb::SubscriptionPriceIntervalsParams::Add::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 + ) + ), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionPriceIntervalsParams::Add::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::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # Configuration for cumulative_grouped_allocation pricing + sig do + returns( + Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + ) + end + attr_reader :cumulative_grouped_allocation_config + + sig do + params( + cumulative_grouped_allocation_config: + Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + ).void + end + 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 + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + sig do + params( + cadence: + Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::SubscriptionPriceIntervalsParams::Add::Price::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( + # 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( + { + cadence: + Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::SubscriptionPriceIntervalsParams::Add::Price::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 + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionPriceIntervalsParams::Add::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 DailyCreditAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -1215,7 +2496,7 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence @@ -1224,21 +2505,21 @@ module Orb sig { returns(String) } attr_accessor :currency - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for daily_credit_allowance pricing sig do returns( - Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig ) end - attr_reader :grouped_with_min_max_thresholds_config + attr_reader :daily_credit_allowance_config sig do params( - grouped_with_min_max_thresholds_config: - Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + daily_credit_allowance_config: + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash ).void end - attr_writer :grouped_with_min_max_thresholds_config + attr_writer :daily_credit_allowance_config # The id of the item the price will be associated with. sig { returns(String) } @@ -1343,10 +2624,10 @@ module Orb sig do params( cadence: - Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::OrSymbol, currency: String, - grouped_with_min_max_thresholds_config: - Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, + daily_credit_allowance_config: + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -1378,8 +2659,8 @@ module Orb 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:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -1416,7 +2697,7 @@ module Orb # by setting `metadata` to `null`. metadata: nil, # The pricing model type - model_type: :grouped_with_min_max_thresholds + model_type: :daily_credit_allowance ) end @@ -1424,10 +2705,10 @@ module Orb override.returns( { cadence: - Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::OrSymbol, currency: String, - grouped_with_min_max_thresholds_config: - Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + daily_credit_allowance_config: + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, model_type: Symbol, name: String, @@ -1466,7 +2747,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::Cadence + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -1474,38 +2755,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -1513,72 +2794,144 @@ module Orb end end - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # The event property used to group before applying thresholds + # Credits granted per day. Lose-it-or-use-it; does not roll over. sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :daily_allowance - # The maximum amount to charge each group + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value sig { returns(String) } - attr_accessor :maximum_charge + attr_accessor :default_unit_amount - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions - # The base price charged per group + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. sig { returns(String) } - attr_accessor :per_unit_rate + attr_accessor :event_day_property - # Configuration for grouped_with_min_max_thresholds pricing + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing sig do params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] ).returns(T.attached_class) end def self.new( - # 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: + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end sig do override.returns( { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] } ) end def to_hash end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance, Orb::Internal::AnyHash ) end @@ -1586,34 +2939,34 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::Cadence::OrSymbol + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for cumulative_grouped_allocation pricing + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for metered_allowance pricing sig do returns( - Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig ) end - attr_reader :cumulative_grouped_allocation_config + attr_reader :metered_allowance_config sig do params( - cumulative_grouped_allocation_config: - Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + metered_allowance_config: + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash ).void end - 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 + attr_writer :metered_allowance_config # The pricing model type sig { returns(Symbol) } @@ -1714,11 +3067,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::OrSymbol, currency: String, item_id: String, + metered_allowance_config: + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -1747,12 +3100,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, # An ISO 4217 currency string for which this price is billed in. currency:, # The id of the item the price will be associated with. item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, # The name of the price. name:, # The id of the billable metric for the price. Only needed if the price is @@ -1787,7 +3140,7 @@ module Orb # by setting `metadata` to `null`. metadata: nil, # The pricing model type - model_type: :cumulative_grouped_allocation + model_type: :metered_allowance ) end @@ -1795,11 +3148,11 @@ module Orb override.returns( { cadence: - Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::OrSymbol, currency: String, item_id: String, + metered_allowance_config: + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -1837,7 +3190,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::Cadence + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -1845,38 +3198,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::Cadence::TaggedSymbol ] ) end @@ -1884,59 +3237,91 @@ module Orb end end - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig, Orb::Internal::AnyHash ) end - # The overall allocation across all groups + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. sig { returns(String) } - attr_accessor :cumulative_allocation + attr_accessor :allowance_grouping_value - # The allocation per individual group + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. sig { returns(String) } - attr_accessor :group_allocation + attr_accessor :consumption_grouping_value - # The event property used to group usage before applying allocations + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. sig { returns(String) } attr_accessor :grouping_key - # The amount to charge for each unit outside of the allocation + # Per-unit price applied to gross consumption and to the allowance credit. sig { returns(String) } attr_accessor :unit_amount - # Configuration for cumulative_grouped_allocation pricing + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing sig do params( - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String ).returns(T.attached_class) end def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil ) end sig do override.returns( { - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } ) end diff --git a/rbi/orb/models/subscription_schedule_plan_change_params.rbi b/rbi/orb/models/subscription_schedule_plan_change_params.rbi index c3ce458d..05cd0e75 100644 --- a/rbi/orb/models/subscription_schedule_plan_change_params.rbi +++ b/rbi/orb/models/subscription_schedule_plan_change_params.rbi @@ -659,6 +659,7 @@ module Orb Orb::NewSubscriptionPackageWithAllocationPrice, Orb::NewSubscriptionUnitWithPercentPrice, Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::NewSubscriptionUnitWithProrationPrice, Orb::NewSubscriptionGroupedAllocationPrice, @@ -673,6 +674,8 @@ module Orb Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::NewSubscriptionCumulativeGroupedBulkPrice, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance, Orb::NewSubscriptionMinimumCompositePrice, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput @@ -719,6 +722,7 @@ module Orb Orb::NewSubscriptionPackageWithAllocationPrice::OrHash, Orb::NewSubscriptionUnitWithPercentPrice::OrHash, Orb::NewSubscriptionMatrixWithAllocationPrice::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::OrHash, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::OrHash, Orb::NewSubscriptionUnitWithProrationPrice::OrHash, Orb::NewSubscriptionGroupedAllocationPrice::OrHash, @@ -733,6 +737,8 @@ module Orb Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice::OrHash, Orb::NewSubscriptionCumulativeGroupedBulkPrice::OrHash, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::OrHash, Orb::NewSubscriptionMinimumCompositePrice::OrHash, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::OrHash, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::OrHash @@ -805,6 +811,7 @@ module Orb Orb::NewSubscriptionPackageWithAllocationPrice, Orb::NewSubscriptionUnitWithPercentPrice, Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::NewSubscriptionUnitWithProrationPrice, Orb::NewSubscriptionGroupedAllocationPrice, @@ -819,6 +826,8 @@ module Orb Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::NewSubscriptionCumulativeGroupedBulkPrice, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance, Orb::NewSubscriptionMinimumCompositePrice, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput @@ -853,6 +862,7 @@ module Orb Orb::NewSubscriptionPackageWithAllocationPrice, Orb::NewSubscriptionUnitWithPercentPrice, Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::NewSubscriptionUnitWithProrationPrice, Orb::NewSubscriptionGroupedAllocationPrice, @@ -867,6 +877,8 @@ module Orb Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::NewSubscriptionCumulativeGroupedBulkPrice, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance, Orb::NewSubscriptionMinimumCompositePrice, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput @@ -1345,11 +1357,11 @@ module Orb end end - class TieredWithProration < Orb::Internal::Type::BaseModel + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Internal::AnyHash ) end @@ -1357,7 +1369,7 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol ) end attr_accessor :cadence @@ -1366,29 +1378,29 @@ module Orb sig { returns(String) } attr_accessor :item_id - # The pricing model type - sig { returns(Symbol) } - attr_accessor :model_type - - # The name of the price. - sig { returns(String) } - attr_accessor :name - - # Configuration for tiered_with_proration pricing + # Configuration for matrix_with_threshold_discounts pricing sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig ) end - attr_reader :tiered_with_proration_config + attr_reader :matrix_with_threshold_discounts_config sig do params( - tiered_with_proration_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + matrix_with_threshold_discounts_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash ).void end - attr_writer :tiered_with_proration_config + attr_writer :matrix_with_threshold_discounts_config + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name # The id of the billable metric for the price. Only needed if the price is # usage-based. @@ -1491,11 +1503,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, + matrix_with_threshold_discounts_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash, name: String, - tiered_with_proration_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1527,10 +1539,10 @@ module Orb cadence:, # The id of the item the price will be associated with. item_id:, + # Configuration for matrix_with_threshold_discounts pricing + matrix_with_threshold_discounts_config:, # The name of the price. name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -1569,7 +1581,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered_with_proration + model_type: :matrix_with_threshold_discounts ) end @@ -1577,12 +1589,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, item_id: String, + matrix_with_threshold_discounts_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, model_type: Symbol, name: String, - tiered_with_proration_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1620,7 +1632,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -1628,38 +1640,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol ] ) end @@ -1667,48 +1679,100 @@ module Orb end end - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, Orb::Internal::AnyHash ) end - # Tiers for rating based on total usage quantities into the specified tier with - # proration + # Unit price used for usage that does not match any defined matrix cell. + sig { returns(String) } + attr_accessor :default_unit_amount + + # First matrix dimension key. + sig { returns(String) } + attr_accessor :first_dimension + + # Per-cell unit prices. sig do returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue ] ) end - attr_accessor :tiers + attr_accessor :matrix_values + + # Optional second matrix dimension key. + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension + + sig do + returns( + T.nilable( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + ) + ) + end + attr_reader :threshold_discount_groups - # Configuration for tiered_with_proration pricing sig do params( - tiers: + threshold_discount_groups: T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).void + end + attr_writer :threshold_discount_groups + + # Configuration for matrix_with_threshold_discounts pricing + sig do + params( + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash ] ).returns(T.attached_class) end def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: + # Unit price used for usage that does not match any defined matrix cell. + default_unit_amount:, + # First matrix dimension key. + first_dimension:, + # Per-cell unit prices. + matrix_values:, + # Optional second matrix dimension key. + second_dimension: nil, + threshold_discount_groups: nil ) end sig do override.returns( { - tiers: + default_unit_amount: String, + first_dimension: String, + matrix_values: T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup ] } ) @@ -1716,40 +1780,114 @@ module Orb def to_hash end - class Tier < Orb::Internal::Type::BaseModel + class MatrixValue < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue, Orb::Internal::AnyHash ) end - # Inclusive tier starting value sig { returns(String) } - attr_accessor :tier_lower_bound + attr_accessor :first_dimension_value - # Amount per unit sig { returns(String) } attr_accessor :unit_amount - # Configuration for a single tiered with proration tier + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension_value + sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class + params( + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + first_dimension_value:, + unit_amount:, + second_dimension_value: nil + ) + end + + sig do + override.returns( + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + } ) end + def to_hash + end + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup, + Orb::Internal::AnyHash + ) + end + + # Discount rate applied to spend above the threshold. + sig { returns(String) } + attr_accessor :above_threshold_discount_percentage + + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + sig { returns(String) } + attr_accessor :below_threshold_discount_percentage + + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + sig { returns(String) } + attr_accessor :cell_coordinates + + sig { returns(String) } + attr_accessor :threshold_amount + + sig { returns(T.nilable(String)) } + attr_accessor :description + + sig do + params( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + ).returns(T.attached_class) + end def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: + # Discount rate applied to spend above the threshold. + above_threshold_discount_percentage:, + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + below_threshold_discount_percentage:, + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + cell_coordinates:, + threshold_amount:, + description: nil ) end sig do override.returns( - { tier_lower_bound: String, unit_amount: String } + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + } ) end def to_hash @@ -1758,11 +1896,11 @@ module Orb end end - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + class TieredWithProration < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Internal::AnyHash ) end @@ -1770,27 +1908,11 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for grouped_with_min_max_thresholds pricing - sig do - returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - ) - end - attr_reader :grouped_with_min_max_thresholds_config - - sig do - params( - grouped_with_min_max_thresholds_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash - ).void - end - attr_writer :grouped_with_min_max_thresholds_config - # The id of the item the price will be associated with. sig { returns(String) } attr_accessor :item_id @@ -1803,6 +1925,22 @@ module Orb sig { returns(String) } attr_accessor :name + # Configuration for tiered_with_proration pricing + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig + ) + end + attr_reader :tiered_with_proration_config + + sig do + params( + tiered_with_proration_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + ).void + end + attr_writer :tiered_with_proration_config + # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -1904,11 +2042,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, name: String, + tiered_with_proration_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1938,12 +2076,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, + # Configuration for tiered_with_proration pricing + tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -1982,7 +2120,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :grouped_with_min_max_thresholds + model_type: :tiered_with_proration ) end @@ -1990,12 +2128,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, item_id: String, model_type: Symbol, name: String, + tiered_with_proration_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2033,7 +2171,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2041,38 +2179,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol ] ) end @@ -2080,72 +2218,102 @@ module Orb end end - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, Orb::Internal::AnyHash ) end - # The event property used to group before applying thresholds - sig { returns(String) } - attr_accessor :grouping_key - - # The maximum amount to charge each group - sig { returns(String) } - attr_accessor :maximum_charge - - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge - - # The base price charged per group - sig { returns(String) } - attr_accessor :per_unit_rate + # Tiers for rating based on total usage quantities into the specified tier with + # proration + sig do + returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] + ) + end + attr_accessor :tiers - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for tiered_with_proration pricing sig do params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + tiers: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash + ] ).returns(T.attached_class) end def self.new( - # The event property used to group before applying thresholds - grouping_key:, - # The maximum amount to charge each group - maximum_charge:, - # The minimum amount to charge each group, regardless of usage - minimum_charge:, - # The base price charged per group - per_unit_rate: + # Tiers for rating based on total usage quantities into the specified tier with + # proration + tiers: ) end sig do override.returns( { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + tiers: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] } ) end def to_hash end + + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, + Orb::Internal::AnyHash + ) + end + + # Inclusive tier starting value + sig { returns(String) } + attr_accessor :tier_lower_bound + + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount + + # Configuration for a single tiered with proration tier + sig do + params(tier_lower_bound: String, unit_amount: String).returns( + T.attached_class + ) + end + def self.new( + # Inclusive tier starting value + tier_lower_bound:, + # Amount per unit + unit_amount: + ) + end + + sig do + override.returns( + { tier_lower_bound: String, unit_amount: String } + ) + end + def to_hash + end + end end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Internal::AnyHash ) end @@ -2153,26 +2321,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for cumulative_grouped_allocation pricing + # Configuration for grouped_with_min_max_thresholds pricing sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig ) end - attr_reader :cumulative_grouped_allocation_config + attr_reader :grouped_with_min_max_thresholds_config sig do params( - cumulative_grouped_allocation_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + grouped_with_min_max_thresholds_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash ).void end - attr_writer :cumulative_grouped_allocation_config + attr_writer :grouped_with_min_max_thresholds_config # The id of the item the price will be associated with. sig { returns(String) } @@ -2287,9 +2455,9 @@ module Orb sig do params( cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -2321,8 +2489,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, + # Configuration for grouped_with_min_max_thresholds pricing + grouped_with_min_max_thresholds_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -2365,7 +2533,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :cumulative_grouped_allocation + model_type: :grouped_with_min_max_thresholds ) end @@ -2373,9 +2541,9 @@ module Orb override.returns( { cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, model_type: Symbol, name: String, @@ -2416,7 +2584,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2424,38 +2592,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ] ) end @@ -2463,59 +2631,59 @@ module Orb end end - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, Orb::Internal::AnyHash ) end - # The overall allocation across all groups + # The event property used to group before applying thresholds sig { returns(String) } - attr_accessor :cumulative_allocation + attr_accessor :grouping_key - # The allocation per individual group + # The maximum amount to charge each group sig { returns(String) } - attr_accessor :group_allocation + attr_accessor :maximum_charge - # The event property used to group usage before applying allocations + # The minimum amount to charge each group, regardless of usage sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :minimum_charge - # The amount to charge for each unit outside of the allocation + # The base price charged per group sig { returns(String) } - attr_accessor :unit_amount + attr_accessor :per_unit_rate - # Configuration for cumulative_grouped_allocation pricing + # Configuration for grouped_with_min_max_thresholds pricing sig do params( - cumulative_allocation: String, - group_allocation: String, grouping_key: String, - unit_amount: String + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String ).returns(T.attached_class) end def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations + # The event property used to group before applying thresholds grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: + # The maximum amount to charge each group + maximum_charge:, + # The minimum amount to charge each group, regardless of usage + minimum_charge:, + # The base price charged per group + per_unit_rate: ) end sig do override.returns( { - cumulative_allocation: String, - group_allocation: String, grouping_key: String, - unit_amount: String + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } ) end @@ -2524,11 +2692,11 @@ module Orb end end - class Percent < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Internal::AnyHash ) end @@ -2536,11 +2704,27 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol ) end attr_accessor :cadence + # Configuration for cumulative_grouped_allocation pricing + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + ) + end + attr_reader :cumulative_grouped_allocation_config + + sig do + params( + cumulative_grouped_allocation_config: + Orb::SubscriptionSchedulePlanChangeParams::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 @@ -2553,22 +2737,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for percent pricing - sig do - returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig - ) - end - attr_reader :percent_config - - sig do - params( - percent_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig::OrHash - ).void - end - attr_writer :percent_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -2670,11 +2838,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, item_id: String, name: String, - percent_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2704,12 +2872,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for cumulative_grouped_allocation pricing + cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, - # Configuration for percent pricing - percent_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -2748,7 +2916,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :percent + model_type: :cumulative_grouped_allocation ) end @@ -2756,12 +2924,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, model_type: Symbol, name: String, - percent_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2799,7 +2967,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2807,38 +2975,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ] ) end @@ -2846,65 +3014,99 @@ module Orb end end - class PercentConfig < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, 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 + # The overall allocation across all groups + sig { returns(String) } + attr_accessor :cumulative_allocation - sig { override.returns({ percent: Float }) } - def to_hash - end - end - end + # The allocation per individual group + sig { returns(String) } + attr_accessor :group_allocation - class EventOutput < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, - Orb::Internal::AnyHash - ) - end + # The event property used to group usage before applying allocations + sig { returns(String) } + attr_accessor :grouping_key - # The cadence to bill for this price on. + # 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 DailyCreditAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for event_output pricing + # Configuration for daily_credit_allowance pricing sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig ) end - attr_reader :event_output_config + attr_reader :daily_credit_allowance_config sig do params( - event_output_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash + daily_credit_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash ).void end - attr_writer :event_output_config + attr_writer :daily_credit_allowance_config # The id of the item the price will be associated with. sig { returns(String) } @@ -3019,9 +3221,9 @@ module Orb sig do params( cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -3053,8 +3255,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for event_output pricing - event_output_config:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -3097,7 +3299,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :event_output + model_type: :daily_credit_allowance ) end @@ -3105,9 +3307,9 @@ module Orb override.returns( { cadence: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, model_type: Symbol, name: String, @@ -3148,7 +3350,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3156,38 +3358,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -3195,411 +3397,1634 @@ module Orb end end - class EventOutputConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # The key in the event data to extract the unit rate from. + # Credits granted per day. Lose-it-or-use-it; does not roll over. sig { returns(String) } - attr_accessor :unit_rating_key + attr_accessor :daily_allowance - # 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 + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + sig { returns(String) } + attr_accessor :default_unit_amount - # 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 + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions - # Configuration for event_output pricing + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + sig { returns(String) } + attr_accessor :event_day_property + + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing sig do params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] ).returns(T.attached_class) end def self.new( - # The 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 + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end sig do override.returns( { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] } ) end def to_hash end - end - end - - sig do - override.returns( - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Variants - ] - ) - end - def self.variants - end - end - end - # Reset billing periods to be aligned with the plan change's effective date or - # start of the month. Defaults to `unchanged` which keeps subscription's existing - # billing cycle alignment. - module BillingCycleAlignment - extend Orb::Internal::Type::Enum + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values - UNCHANGED = - T.let( - :unchanged, - Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol - ) - PLAN_CHANGE_DATE = - T.let( - :plan_change_date, - Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol - ) - START_OF_MONTH = - T.let( - :start_of_month, - Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol - ) + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount - sig do - override.returns( - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol - ] - ) - end - def self.values - end - end + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end - class RemoveAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::RemoveAdjustment, - Orb::Internal::AnyHash - ) + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end + end end - # The id of the adjustment to remove on the subscription. - sig { returns(String) } - attr_accessor :adjustment_id + class MeteredAllowance < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance, + Orb::Internal::AnyHash + ) + end - sig { params(adjustment_id: String).returns(T.attached_class) } - def self.new( - # The id of the adjustment to remove on the subscription. - adjustment_id: - ) - end + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol + ) + end + attr_accessor :cadence - sig { override.returns({ adjustment_id: String }) } - def to_hash - end - end + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id - class RemovePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::RemovePrice, - Orb::Internal::AnyHash - ) - end + # Configuration for metered_allowance pricing + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig + ) + end + attr_reader :metered_allowance_config - # The external price id of the price to remove on the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id + sig do + params( + metered_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash + ).void + end + attr_writer :metered_allowance_config - # The id of the price to remove on the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :price_id + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type - sig do - params( - external_price_id: T.nilable(String), - price_id: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The external price id of the price to remove on the subscription. - external_price_id: nil, - # The id of the price to remove on the subscription. - price_id: nil - ) - end - - sig do - override.returns( - { - external_price_id: T.nilable(String), - price_id: T.nilable(String) - } - ) - end - def to_hash - end - end - - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment, - Orb::Internal::AnyHash - ) - end + # The name of the price. + sig { returns(String) } + attr_accessor :name - # The definition of a new adjustment to create and add to the subscription. - sig do - returns( - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ) - ) - end - attr_accessor :adjustment + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id - # The id of the adjustment on the plan to replace in the subscription. - sig { returns(String) } - attr_accessor :replaces_adjustment_id + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance - sig do - params( - adjustment: - T.any( - Orb::NewPercentageDiscount::OrHash, - Orb::NewUsageDiscount::OrHash, - Orb::NewAmountDiscount::OrHash, - Orb::NewMinimum::OrHash, - Orb::NewMaximum::OrHash - ), - replaces_adjustment_id: String - ).returns(T.attached_class) - end - def self.new( - # The definition of a new adjustment to create and add to the subscription. - adjustment:, - # The id of the adjustment on the plan to replace in the subscription. - replaces_adjustment_id: - ) - end + # For custom cadence: 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( - { - adjustment: - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum - ), - replaces_adjustment_id: String - } - ) - end - def to_hash - 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 subscription. - module Adjustment - extend Orb::Internal::Type::Union + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate - Variants = - T.type_alias do - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) ) end + attr_accessor :conversion_rate_config - sig do - override.returns( - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::Variants - ] - ) - end - def self.variants - end - end - end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency - class ReplacePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice, - Orb::Internal::AnyHash - ) - end + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration - # The id of the price on the plan to replace in the subscription. - sig { returns(String) } - attr_accessor :replaces_price_id + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration - # The definition of a new allocation price to create and add to the subscription. - sig { returns(T.nilable(Orb::NewAllocationPrice)) } - attr_reader :allocation_price + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id - sig do - params( - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) - ).void - end - attr_writer :allocation_price + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity - # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the - # replacement price. - sig { returns(T.nilable(T::Array[Orb::DiscountOverride])) } - attr_accessor :discounts + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key - # The external price id of the price to add to the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :external_price_id + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration - # The new quantity of the price, if the price is a fixed price. - sig { returns(T.nilable(Float)) } - attr_accessor :fixed_price_quantity + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration - # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for - # the replacement price. - sig { returns(T.nilable(String)) } - attr_accessor :maximum_amount + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id - # Override values for parameterized billable metric variables. Keys are parameter - # names, values are the override values. - sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } - attr_accessor :metric_parameter_overrides + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata - # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for - # the replacement price. - sig { returns(T.nilable(String)) } - attr_accessor :minimum_amount + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id - # New subscription price request body params. - sig do - returns( - T.nilable( - T.any( - Orb::NewSubscriptionUnitPrice, - Orb::NewSubscriptionTieredPrice, - Orb::NewSubscriptionBulkPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewSubscriptionPackagePrice, - Orb::NewSubscriptionMatrixPrice, - Orb::NewSubscriptionThresholdTotalAmountPrice, - Orb::NewSubscriptionTieredPackagePrice, - Orb::NewSubscriptionTieredWithMinimumPrice, - Orb::NewSubscriptionGroupedTieredPrice, - Orb::NewSubscriptionTieredPackageWithMinimumPrice, - Orb::NewSubscriptionPackageWithAllocationPrice, - Orb::NewSubscriptionUnitWithPercentPrice, - Orb::NewSubscriptionMatrixWithAllocationPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, - Orb::NewSubscriptionUnitWithProrationPrice, - Orb::NewSubscriptionGroupedAllocationPrice, - Orb::NewSubscriptionBulkWithProrationPrice, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::NewSubscriptionGroupedTieredPackagePrice, - Orb::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::NewSubscriptionMinimumCompositePrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput - ) + sig do + params( + cadence: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, + item_id: String, + metered_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :metered_allowance ) - ) - end - attr_accessor :price + end - # The id of the price to add to the subscription. - sig { returns(T.nilable(String)) } - attr_accessor :price_id + sig do + override.returns( + { + cadence: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::OrSymbol, + item_id: String, + metered_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end - sig do - params( - replaces_price_id: String, - allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), - discounts: T.nilable(T::Array[Orb::DiscountOverride::OrHash]), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - maximum_amount: T.nilable(String), - metric_parameter_overrides: T.nilable(T::Hash[Symbol, T.anything]), - minimum_amount: T.nilable(String), - price: - T.nilable( + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + Orb::Internal::AnyHash + ) + end + + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + sig { returns(String) } + attr_accessor :allowance_grouping_value + + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + sig { returns(String) } + attr_accessor :consumption_grouping_value + + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + sig { returns(String) } + attr_accessor :grouping_key + + # Per-unit price applied to gross consumption and to the allowance credit. + sig { returns(String) } + attr_accessor :unit_amount + + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing + sig do + params( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + ).returns(T.attached_class) + end + def self.new( + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. + grouping_key:, + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil + ) + end + + sig do + override.returns( + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + ) + end + def to_hash + end + end + end + + class Percent < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do T.any( - Orb::NewSubscriptionUnitPrice::OrHash, - Orb::NewSubscriptionTieredPrice::OrHash, - Orb::NewSubscriptionBulkPrice::OrHash, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::OrHash, - Orb::NewSubscriptionPackagePrice::OrHash, - Orb::NewSubscriptionMatrixPrice::OrHash, - Orb::NewSubscriptionThresholdTotalAmountPrice::OrHash, - Orb::NewSubscriptionTieredPackagePrice::OrHash, - Orb::NewSubscriptionTieredWithMinimumPrice::OrHash, - Orb::NewSubscriptionGroupedTieredPrice::OrHash, - Orb::NewSubscriptionTieredPackageWithMinimumPrice::OrHash, - Orb::NewSubscriptionPackageWithAllocationPrice::OrHash, - Orb::NewSubscriptionUnitWithPercentPrice::OrHash, - Orb::NewSubscriptionMatrixWithAllocationPrice::OrHash, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::OrHash, - Orb::NewSubscriptionUnitWithProrationPrice::OrHash, - Orb::NewSubscriptionGroupedAllocationPrice::OrHash, - Orb::NewSubscriptionBulkWithProrationPrice::OrHash, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice::OrHash, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig + ) + end + attr_reader :percent_config + + sig do + params( + percent_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig::OrHash + ).void + end + attr_writer :percent_config + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + sig do + params( + cadence: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::OrSymbol, + item_id: String, + name: String, + percent_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig::OrHash, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_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::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::OrSymbol, + item_id: String, + model_type: Symbol, + name: String, + percent_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # Configuration for event_output pricing + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig + ) + end + attr_reader :event_output_config + + sig do + params( + event_output_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash + ).void + end + attr_writer :event_output_config + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # 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::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # Configuration for event_output pricing + event_output_config:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :event_output + ) + end + + sig do + override.returns( + { + cadence: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, + event_output_config: + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class EventOutputConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::Internal::AnyHash + ) + end + + # The key in the event data to extract the unit rate from. + sig { returns(String) } + attr_accessor :unit_rating_key + + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + sig { returns(T.nilable(String)) } + attr_accessor :default_unit_rate + + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + sig { returns(T.nilable(String)) } + attr_accessor :grouping_key + + # Configuration for event_output pricing + sig do + params( + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The key in the event data to extract the unit rate from. + unit_rating_key:, + # If provided, this amount will be used as the unit rate when an event does not + # have a value for the `unit_rating_key`. If not provided, events missing a unit + # rate will be ignored. + default_unit_rate: nil, + # An optional key in the event data to group by (e.g., event ID). All events will + # also be grouped by their unit rate. + grouping_key: nil + ) + end + + sig do + override.returns( + { + unit_rating_key: String, + default_unit_rate: T.nilable(String), + grouping_key: T.nilable(String) + } + ) + end + def to_hash + end + end + end + + sig do + override.returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Variants + ] + ) + end + def self.variants + end + end + end + + # Reset billing periods to be aligned with the plan change's effective date or + # start of the month. Defaults to `unchanged` which keeps subscription's existing + # billing cycle alignment. + module BillingCycleAlignment + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + UNCHANGED = + T.let( + :unchanged, + Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol + ) + PLAN_CHANGE_DATE = + T.let( + :plan_change_date, + Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol + ) + START_OF_MONTH = + T.let( + :start_of_month, + Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment::TaggedSymbol + ] + ) + end + def self.values + end + end + + class RemoveAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::RemoveAdjustment, + Orb::Internal::AnyHash + ) + end + + # The id of the adjustment to remove on the subscription. + sig { returns(String) } + attr_accessor :adjustment_id + + sig { params(adjustment_id: String).returns(T.attached_class) } + def self.new( + # The id of the adjustment to remove on the subscription. + adjustment_id: + ) + end + + sig { override.returns({ adjustment_id: String }) } + def to_hash + end + end + + class RemovePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::RemovePrice, + Orb::Internal::AnyHash + ) + end + + # The external price id of the price to remove on the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # The id of the price to remove on the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :price_id + + sig do + params( + external_price_id: T.nilable(String), + price_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The external price id of the price to remove on the subscription. + external_price_id: nil, + # The id of the price to remove on the subscription. + price_id: nil + ) + end + + sig do + override.returns( + { + external_price_id: T.nilable(String), + price_id: T.nilable(String) + } + ) + end + def to_hash + end + end + + class ReplaceAdjustment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment, + Orb::Internal::AnyHash + ) + end + + # The definition of a new adjustment to create and add to the subscription. + sig do + returns( + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ) + ) + end + attr_accessor :adjustment + + # The id of the adjustment on the plan to replace in the subscription. + sig { returns(String) } + attr_accessor :replaces_adjustment_id + + sig do + params( + adjustment: + T.any( + Orb::NewPercentageDiscount::OrHash, + Orb::NewUsageDiscount::OrHash, + Orb::NewAmountDiscount::OrHash, + Orb::NewMinimum::OrHash, + Orb::NewMaximum::OrHash + ), + replaces_adjustment_id: String + ).returns(T.attached_class) + end + def self.new( + # The definition of a new adjustment to create and add to the subscription. + adjustment:, + # The id of the adjustment on the plan to replace in the subscription. + replaces_adjustment_id: + ) + end + + sig do + override.returns( + { + adjustment: + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ), + replaces_adjustment_id: String + } + ) + end + def to_hash + end + + # The definition of a new adjustment to create and add to the subscription. + module Adjustment + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewPercentageDiscount, + Orb::NewUsageDiscount, + Orb::NewAmountDiscount, + Orb::NewMinimum, + Orb::NewMaximum + ) + end + + sig do + override.returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::Variants + ] + ) + end + def self.variants + end + end + end + + class ReplacePrice < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice, + Orb::Internal::AnyHash + ) + end + + # The id of the price on the plan to replace in the subscription. + sig { returns(String) } + attr_accessor :replaces_price_id + + # The definition of a new allocation price to create and add to the subscription. + sig { returns(T.nilable(Orb::NewAllocationPrice)) } + attr_reader :allocation_price + + sig do + params( + allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash) + ).void + end + attr_writer :allocation_price + + # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the + # replacement price. + sig { returns(T.nilable(T::Array[Orb::DiscountOverride])) } + attr_accessor :discounts + + # The external price id of the price to add to the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # The new quantity of the price, if the price is a fixed price. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for + # the replacement price. + sig { returns(T.nilable(String)) } + attr_accessor :maximum_amount + + # Override values for parameterized billable metric variables. Keys are parameter + # names, values are the override values. + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_accessor :metric_parameter_overrides + + # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for + # the replacement price. + sig { returns(T.nilable(String)) } + attr_accessor :minimum_amount + + # New subscription price request body params. + sig do + returns( + T.nilable( + T.any( + Orb::NewSubscriptionUnitPrice, + Orb::NewSubscriptionTieredPrice, + Orb::NewSubscriptionBulkPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewSubscriptionPackagePrice, + Orb::NewSubscriptionMatrixPrice, + Orb::NewSubscriptionThresholdTotalAmountPrice, + Orb::NewSubscriptionTieredPackagePrice, + Orb::NewSubscriptionTieredWithMinimumPrice, + Orb::NewSubscriptionGroupedTieredPrice, + Orb::NewSubscriptionTieredPackageWithMinimumPrice, + Orb::NewSubscriptionPackageWithAllocationPrice, + Orb::NewSubscriptionUnitWithPercentPrice, + Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, + Orb::NewSubscriptionUnitWithProrationPrice, + Orb::NewSubscriptionGroupedAllocationPrice, + Orb::NewSubscriptionBulkWithProrationPrice, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::NewSubscriptionGroupedTieredPackagePrice, + Orb::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewSubscriptionMinimumCompositePrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput + ) + ) + ) + end + attr_accessor :price + + # The id of the price to add to the subscription. + sig { returns(T.nilable(String)) } + attr_accessor :price_id + + sig do + params( + replaces_price_id: String, + allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash), + discounts: T.nilable(T::Array[Orb::DiscountOverride::OrHash]), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + maximum_amount: T.nilable(String), + metric_parameter_overrides: T.nilable(T::Hash[Symbol, T.anything]), + minimum_amount: T.nilable(String), + price: + T.nilable( + T.any( + Orb::NewSubscriptionUnitPrice::OrHash, + Orb::NewSubscriptionTieredPrice::OrHash, + Orb::NewSubscriptionBulkPrice::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::OrHash, + Orb::NewSubscriptionPackagePrice::OrHash, + Orb::NewSubscriptionMatrixPrice::OrHash, + Orb::NewSubscriptionThresholdTotalAmountPrice::OrHash, + Orb::NewSubscriptionTieredPackagePrice::OrHash, + Orb::NewSubscriptionTieredWithMinimumPrice::OrHash, + Orb::NewSubscriptionGroupedTieredPrice::OrHash, + Orb::NewSubscriptionTieredPackageWithMinimumPrice::OrHash, + Orb::NewSubscriptionPackageWithAllocationPrice::OrHash, + Orb::NewSubscriptionUnitWithPercentPrice::OrHash, + Orb::NewSubscriptionMatrixWithAllocationPrice::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::OrHash, + Orb::NewSubscriptionUnitWithProrationPrice::OrHash, + Orb::NewSubscriptionGroupedAllocationPrice::OrHash, + Orb::NewSubscriptionBulkWithProrationPrice::OrHash, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice::OrHash, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice::OrHash, Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::OrHash, Orb::NewSubscriptionMatrixWithDisplayNamePrice::OrHash, Orb::NewSubscriptionGroupedTieredPackagePrice::OrHash, @@ -3608,170 +5033,1602 @@ module Orb Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice::OrHash, Orb::NewSubscriptionCumulativeGroupedBulkPrice::OrHash, Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::OrHash, Orb::NewSubscriptionMinimumCompositePrice::OrHash, Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent::OrHash, Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput::OrHash ) - ), - price_id: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The id of the price on the plan to replace in the subscription. - replaces_price_id:, - # The definition of a new allocation price to create and add to the subscription. - allocation_price: nil, - # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the - # replacement price. - discounts: nil, - # The external price id of the price to add to the subscription. - external_price_id: nil, - # The new quantity of the price, if the price is a fixed price. - fixed_price_quantity: nil, - # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for - # the replacement price. - maximum_amount: nil, - # Override values for parameterized billable metric variables. Keys are parameter - # names, values are the override values. - metric_parameter_overrides: nil, - # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for - # the replacement price. - minimum_amount: nil, - # New subscription price request body params. - price: nil, - # The id of the price to add to the subscription. - price_id: nil - ) - end + ), + price_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The id of the price on the plan to replace in the subscription. + replaces_price_id:, + # The definition of a new allocation price to create and add to the subscription. + allocation_price: nil, + # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the + # replacement price. + discounts: nil, + # The external price id of the price to add to the subscription. + external_price_id: nil, + # The new quantity of the price, if the price is a fixed price. + fixed_price_quantity: nil, + # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for + # the replacement price. + maximum_amount: nil, + # Override values for parameterized billable metric variables. Keys are parameter + # names, values are the override values. + metric_parameter_overrides: nil, + # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for + # the replacement price. + minimum_amount: nil, + # New subscription price request body params. + price: nil, + # The id of the price to add to the subscription. + price_id: nil + ) + end + + sig do + override.returns( + { + replaces_price_id: String, + allocation_price: T.nilable(Orb::NewAllocationPrice), + discounts: T.nilable(T::Array[Orb::DiscountOverride]), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + maximum_amount: T.nilable(String), + metric_parameter_overrides: + T.nilable(T::Hash[Symbol, T.anything]), + minimum_amount: T.nilable(String), + price: + T.nilable( + T.any( + Orb::NewSubscriptionUnitPrice, + Orb::NewSubscriptionTieredPrice, + Orb::NewSubscriptionBulkPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewSubscriptionPackagePrice, + Orb::NewSubscriptionMatrixPrice, + Orb::NewSubscriptionThresholdTotalAmountPrice, + Orb::NewSubscriptionTieredPackagePrice, + Orb::NewSubscriptionTieredWithMinimumPrice, + Orb::NewSubscriptionGroupedTieredPrice, + Orb::NewSubscriptionTieredPackageWithMinimumPrice, + Orb::NewSubscriptionPackageWithAllocationPrice, + Orb::NewSubscriptionUnitWithPercentPrice, + Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, + Orb::NewSubscriptionUnitWithProrationPrice, + Orb::NewSubscriptionGroupedAllocationPrice, + Orb::NewSubscriptionBulkWithProrationPrice, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::NewSubscriptionGroupedTieredPackagePrice, + Orb::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewSubscriptionMinimumCompositePrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput + ) + ), + price_id: T.nilable(String) + } + ) + end + def to_hash + end + + # New subscription price request body params. + module Price + extend Orb::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Orb::NewSubscriptionUnitPrice, + Orb::NewSubscriptionTieredPrice, + Orb::NewSubscriptionBulkPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, + Orb::NewSubscriptionPackagePrice, + Orb::NewSubscriptionMatrixPrice, + Orb::NewSubscriptionThresholdTotalAmountPrice, + Orb::NewSubscriptionTieredPackagePrice, + Orb::NewSubscriptionTieredWithMinimumPrice, + Orb::NewSubscriptionGroupedTieredPrice, + Orb::NewSubscriptionTieredPackageWithMinimumPrice, + Orb::NewSubscriptionPackageWithAllocationPrice, + Orb::NewSubscriptionUnitWithPercentPrice, + Orb::NewSubscriptionMatrixWithAllocationPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, + Orb::NewSubscriptionUnitWithProrationPrice, + Orb::NewSubscriptionGroupedAllocationPrice, + Orb::NewSubscriptionBulkWithProrationPrice, + Orb::NewSubscriptionGroupedWithProratedMinimumPrice, + Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::NewSubscriptionMatrixWithDisplayNamePrice, + Orb::NewSubscriptionGroupedTieredPackagePrice, + Orb::NewSubscriptionMaxGroupTieredPackagePrice, + Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, + Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, + Orb::NewSubscriptionCumulativeGroupedBulkPrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, + Orb::NewSubscriptionMinimumCompositePrice, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput + ) + end + + class BulkWithFilters < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, + Orb::Internal::AnyHash + ) + end + + # Configuration for bulk_with_filters pricing + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig + ) + end + attr_reader :bulk_with_filters_config + + sig do + params( + bulk_with_filters_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash + ).void + end + attr_writer :bulk_with_filters_config + + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type + + # The name of the price. + sig { returns(String) } + attr_accessor :name + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + sig do + params( + bulk_with_filters_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, + cadence: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + item_id: String, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # Configuration for bulk_with_filters pricing + bulk_with_filters_config:, + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :bulk_with_filters + ) + end + + sig do + override.returns( + { + bulk_with_filters_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + Orb::Internal::AnyHash + ) + end + + # Property filters to apply (all must match) + sig do + returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ] + ) + end + attr_accessor :filters + + # Bulk tiers for rating based on total usage volume + sig do + returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + ) + end + attr_accessor :tiers + + # Configuration for bulk_with_filters pricing + sig do + params( + filters: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash + ], + tiers: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Property filters to apply (all must match) + filters:, + # Bulk tiers for rating based on total usage volume + tiers: + ) + end + + sig do + override.returns( + { + filters: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter + ], + tiers: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + } + ) + end + def to_hash + end + + class Filter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, + Orb::Internal::AnyHash + ) + end + + # Event property key to filter on + sig { returns(String) } + attr_accessor :property_key + + # Event property value to match + sig { returns(String) } + attr_accessor :property_value + + # Configuration for a single property filter + sig do + params(property_key: String, property_value: String).returns( + T.attached_class + ) + end + def self.new( + # Event property key to filter on + property_key:, + # Event property value to match + property_value: + ) + end + + sig do + override.returns( + { property_key: String, property_value: String } + ) + end + def to_hash + end + end + + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, + Orb::Internal::AnyHash + ) + end + + # 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::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol + ) + end + attr_accessor :cadence + + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for matrix_with_threshold_discounts pricing + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + ) + end + attr_reader :matrix_with_threshold_discounts_config + + sig do + params( + matrix_with_threshold_discounts_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash + ).void + end + attr_writer :matrix_with_threshold_discounts_config + + # The pricing model type + sig { returns(Symbol) } + 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::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, + item_id: String, + matrix_with_threshold_discounts_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String), + model_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The cadence to bill for this price on. + cadence:, + # The id of the item the price will be associated with. + item_id:, + # Configuration for matrix_with_threshold_discounts pricing + matrix_with_threshold_discounts_config:, + # The name of the price. + name:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. + billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. + conversion_rate: nil, + # The configuration for the rate of the price currency to the invoicing currency. + conversion_rate_config: nil, + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + currency: nil, + # For dimensional price: specifies a price group and dimension values + dimensional_price_configuration: nil, + # An alias for the price. + external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + fixed_price_quantity: nil, + # The property used to group this price on an invoice + invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + invoicing_cycle_configuration: nil, + # The ID of the license type to associate with this price. + license_type_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + reference_id: nil, + # The pricing model type + model_type: :matrix_with_threshold_discounts + ) + end + + sig do + override.returns( + { + cadence: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol, + item_id: String, + matrix_with_threshold_discounts_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + Orb::Internal::AnyHash + ) + end + + # Unit price used for usage that does not match any defined matrix cell. + sig { returns(String) } + attr_accessor :default_unit_amount + + # First matrix dimension key. + sig { returns(String) } + attr_accessor :first_dimension + + # Per-cell unit prices. + sig do + returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Optional second matrix dimension key. + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension + + sig do + returns( + T.nilable( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + ) + ) + end + attr_reader :threshold_discount_groups + + sig do + params( + threshold_discount_groups: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).void + end + attr_writer :threshold_discount_groups + + # Configuration for matrix_with_threshold_discounts pricing + sig do + params( + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # Unit price used for usage that does not match any defined matrix cell. + default_unit_amount:, + # First matrix dimension key. + first_dimension:, + # Per-cell unit prices. + matrix_values:, + # Optional second matrix dimension key. + second_dimension: nil, + threshold_discount_groups: nil + ) + end + + sig do + override.returns( + { + default_unit_amount: String, + first_dimension: String, + matrix_values: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue + ], + second_dimension: T.nilable(String), + threshold_discount_groups: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup + ] + } + ) + end + def to_hash + end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :first_dimension_value + + sig { returns(String) } + attr_accessor :unit_amount + + sig { returns(T.nilable(String)) } + attr_accessor :second_dimension_value + + sig do + params( + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + first_dimension_value:, + unit_amount:, + second_dimension_value: nil + ) + end + + sig do + override.returns( + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: T.nilable(String) + } + ) + end + def to_hash + end + end + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup, + Orb::Internal::AnyHash + ) + end + + # Discount rate applied to spend above the threshold. + sig { returns(String) } + attr_accessor :above_threshold_discount_percentage + + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + sig { returns(String) } + attr_accessor :below_threshold_discount_percentage + + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + sig { returns(String) } + attr_accessor :cell_coordinates + + sig { returns(String) } + attr_accessor :threshold_amount + + sig { returns(T.nilable(String)) } + attr_accessor :description + + sig do + params( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Discount rate applied to spend above the threshold. + above_threshold_discount_percentage:, + # Discount rate applied to spend at or below the threshold. Set to 0 for no + # baseline discount. + below_threshold_discount_percentage:, + # Semicolon-separated list of matrix cell coordinates targeted by this group. Each + # coordinate is `first,second` when the matrix has two dimensions, or just `first` + # for a single-dimension matrix. Example: `blue,circle;green,triangle`. + cell_coordinates:, + threshold_amount:, + description: nil + ) + end + + sig do + override.returns( + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: T.nilable(String) + } + ) + end + def to_hash + end + end + end + end + + class TieredWithProration < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::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::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig + ) + end + attr_reader :tiered_with_proration_config + + sig do + params( + tiered_with_proration_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash + ).void + end + attr_writer :tiered_with_proration_config + + # The id of the billable metric for the price. Only needed if the price is + # usage-based. + sig { returns(T.nilable(String)) } + attr_accessor :billable_metric_id + + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :billed_in_advance + + # For custom cadence: specifies the duration of the billing period in days or + # months. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :billing_cycle_configuration + + sig do + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration + + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate + + # The configuration for the rate of the price currency to the invoicing currency. + sig do + returns( + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ) + ) + end + attr_accessor :conversion_rate_config + + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration + + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration + + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id + + # If the Price represents a fixed cost, this represents the quantity of units + # applied. + sig { returns(T.nilable(Float)) } + attr_accessor :fixed_price_quantity + + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key + + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. + sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) } + attr_reader :invoicing_cycle_configuration + + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration + + # The ID of the license type to associate with this price. + sig { returns(T.nilable(String)) } + attr_accessor :license_type_id + + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } + attr_accessor :metadata + + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. + sig { returns(T.nilable(String)) } + attr_accessor :reference_id + + sig do + params( + cadence: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, + item_id: String, + name: String, + tiered_with_proration_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig::OrHash, + Orb::TieredConversionRateConfig::OrHash + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_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::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, + item_id: String, + model_type: Symbol, + name: String, + tiered_with_proration_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash + end + + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ) - sig do - override.returns( - { - replaces_price_id: String, - allocation_price: T.nilable(Orb::NewAllocationPrice), - discounts: T.nilable(T::Array[Orb::DiscountOverride]), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - maximum_amount: T.nilable(String), - metric_parameter_overrides: - T.nilable(T::Hash[Symbol, T.anything]), - minimum_amount: T.nilable(String), - price: - T.nilable( + sig do + override.returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do T.any( - Orb::NewSubscriptionUnitPrice, - Orb::NewSubscriptionTieredPrice, - Orb::NewSubscriptionBulkPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewSubscriptionPackagePrice, - Orb::NewSubscriptionMatrixPrice, - Orb::NewSubscriptionThresholdTotalAmountPrice, - Orb::NewSubscriptionTieredPackagePrice, - Orb::NewSubscriptionTieredWithMinimumPrice, - Orb::NewSubscriptionGroupedTieredPrice, - Orb::NewSubscriptionTieredPackageWithMinimumPrice, - Orb::NewSubscriptionPackageWithAllocationPrice, - Orb::NewSubscriptionUnitWithPercentPrice, - Orb::NewSubscriptionMatrixWithAllocationPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, - Orb::NewSubscriptionUnitWithProrationPrice, - Orb::NewSubscriptionGroupedAllocationPrice, - Orb::NewSubscriptionBulkWithProrationPrice, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::NewSubscriptionGroupedTieredPackagePrice, - Orb::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::NewSubscriptionMinimumCompositePrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, + Orb::Internal::AnyHash ) - ), - price_id: T.nilable(String) - } - ) - end - def to_hash - end + end - # New subscription price request body params. - module Price - extend Orb::Internal::Type::Union + # Tiers for rating based on total usage quantities into the specified tier with + # proration + sig do + returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] + ) + end + attr_accessor :tiers - Variants = - T.type_alias do - T.any( - Orb::NewSubscriptionUnitPrice, - Orb::NewSubscriptionTieredPrice, - Orb::NewSubscriptionBulkPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, - Orb::NewSubscriptionPackagePrice, - Orb::NewSubscriptionMatrixPrice, - Orb::NewSubscriptionThresholdTotalAmountPrice, - Orb::NewSubscriptionTieredPackagePrice, - Orb::NewSubscriptionTieredWithMinimumPrice, - Orb::NewSubscriptionGroupedTieredPrice, - Orb::NewSubscriptionTieredPackageWithMinimumPrice, - Orb::NewSubscriptionPackageWithAllocationPrice, - Orb::NewSubscriptionUnitWithPercentPrice, - Orb::NewSubscriptionMatrixWithAllocationPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, - Orb::NewSubscriptionUnitWithProrationPrice, - Orb::NewSubscriptionGroupedAllocationPrice, - Orb::NewSubscriptionBulkWithProrationPrice, - Orb::NewSubscriptionGroupedWithProratedMinimumPrice, - Orb::NewSubscriptionGroupedWithMeteredMinimumPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, - Orb::NewSubscriptionMatrixWithDisplayNamePrice, - Orb::NewSubscriptionGroupedTieredPackagePrice, - Orb::NewSubscriptionMaxGroupTieredPackagePrice, - Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice, - Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice, - Orb::NewSubscriptionCumulativeGroupedBulkPrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, - Orb::NewSubscriptionMinimumCompositePrice, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput + # Configuration for tiered_with_proration pricing + sig do + params( + tiers: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::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::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier + ] + } + ) + end + def to_hash + end + + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, + Orb::Internal::AnyHash + ) + end + + # Inclusive tier starting value + sig { returns(String) } + attr_accessor :tier_lower_bound + + # Amount per unit + sig { returns(String) } + attr_accessor :unit_amount + + # Configuration for a single tiered with proration tier + sig do + params(tier_lower_bound: String, unit_amount: String).returns( + T.attached_class + ) + end + def self.new( + # Inclusive tier starting value + tier_lower_bound:, + # Amount per unit + unit_amount: + ) + end + + sig do + override.returns( + { tier_lower_bound: String, unit_amount: String } + ) + end + def to_hash + end + end end + end - class BulkWithFilters < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Internal::AnyHash ) end - # Configuration for bulk_with_filters pricing + # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol ) end - attr_reader :bulk_with_filters_config - - sig do - params( - bulk_with_filters_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash - ).void - end - attr_writer :bulk_with_filters_config + attr_accessor :cadence - # The cadence to bill for this price on. + # Configuration for grouped_with_min_max_thresholds pricing sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig ) end - attr_accessor :cadence + attr_reader :grouped_with_min_max_thresholds_config + + sig do + params( + grouped_with_min_max_thresholds_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + ).void + end + attr_writer :grouped_with_min_max_thresholds_config # The id of the item the price will be associated with. sig { returns(String) } @@ -3885,10 +6742,10 @@ module Orb sig do params( - bulk_with_filters_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -3903,257 +6760,108 @@ module Orb Orb::TieredConversionRateConfig::OrHash ) ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration::OrHash), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String), - model_type: Symbol - ).returns(T.attached_class) - end - def self.new( - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, - # The cadence to bill for this price on. - cadence:, - # The id of the item the price will be associated with. - item_id:, - # The name of the price. - name:, - # The id of the billable metric for the price. Only needed if the price is - # usage-based. - billable_metric_id: nil, - # If the Price represents a fixed cost, the price will be billed in-advance if - # this is true, and in-arrears if this is false. - billed_in_advance: nil, - # For custom cadence: specifies the duration of the billing period in days or - # months. - billing_cycle_configuration: nil, - # The per unit conversion rate of the price currency to the invoicing currency. - conversion_rate: nil, - # The configuration for the rate of the price currency to the invoicing currency. - conversion_rate_config: nil, - # An ISO 4217 currency string, or custom pricing unit identifier, in which this - # price is billed. - currency: nil, - # For dimensional price: specifies a price group and dimension values - dimensional_price_configuration: nil, - # An alias for the price. - external_price_id: nil, - # If the Price represents a fixed cost, this represents the quantity of units - # applied. - fixed_price_quantity: nil, - # The property used to group this price on an invoice - invoice_grouping_key: nil, - # Within each billing cycle, specifies the cadence at which invoices are produced. - # If unspecified, a single invoice is produced per billing cycle. - invoicing_cycle_configuration: nil, - # The ID of the license type to associate with this price. - license_type_id: nil, - # User-specified key/value pairs for the resource. Individual keys can be removed - # by setting the value to `null`, and the entire metadata mapping can be cleared - # by setting `metadata` to `null`. - metadata: nil, - # A transient ID that can be used to reference this price when adding adjustments - # in the same API call. - reference_id: nil, - # The pricing model type - model_type: :bulk_with_filters - ) - end - - sig do - override.returns( - { - bulk_with_filters_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::OrSymbol, - item_id: String, - model_type: Symbol, - name: String, - billable_metric_id: T.nilable(String), - billed_in_advance: T.nilable(T::Boolean), - billing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - conversion_rate: T.nilable(Float), - conversion_rate_config: - T.nilable( - T.any( - Orb::UnitConversionRateConfig, - Orb::TieredConversionRateConfig - ) - ), - currency: T.nilable(String), - dimensional_price_configuration: - T.nilable(Orb::NewDimensionalPriceConfiguration), - external_price_id: T.nilable(String), - fixed_price_quantity: T.nilable(Float), - invoice_grouping_key: T.nilable(String), - invoicing_cycle_configuration: - T.nilable(Orb::NewBillingCycleConfiguration), - license_type_id: T.nilable(String), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - reference_id: T.nilable(String) - } - ) - end - def to_hash - end - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, - Orb::Internal::AnyHash - ) - end - - # Property filters to apply (all must match) - sig do - returns( - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ] - ) - end - attr_accessor :filters - - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - ) - end - attr_accessor :tiers - - # Configuration for bulk_with_filters pricing - sig do - params( - filters: - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash - ], - tiers: - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Property filters to apply (all must match) - filters:, - # Bulk tiers for rating based on total usage volume - tiers: - ) - end - - sig do - override.returns( - { - filters: - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter - ], - tiers: - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier - ] - } - ) - end - def to_hash - end - - class Filter < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter, - Orb::Internal::AnyHash - ) - end - - # Event property key to filter on - sig { returns(String) } - attr_accessor :property_key - - # Event property value to match - sig { returns(String) } - attr_accessor :property_value - - # Configuration for a single property filter - sig do - params(property_key: String, property_value: String).returns( - T.attached_class - ) - end - def self.new( - # Event property key to filter on - property_key:, - # Event property value to match - property_value: - ) - end - - sig do - override.returns( - { property_key: String, property_value: String } - ) - end - def to_hash - end - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # 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 + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_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( - { unit_amount: String, tier_lower_bound: T.nilable(String) } - ) - end - def to_hash - end - end + sig do + override.returns( + { + cadence: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + grouped_with_min_max_thresholds_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + item_id: String, + model_type: Symbol, + name: String, + billable_metric_id: T.nilable(String), + billed_in_advance: T.nilable(T::Boolean), + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + conversion_rate: T.nilable(Float), + conversion_rate_config: + T.nilable( + T.any( + Orb::UnitConversionRateConfig, + Orb::TieredConversionRateConfig + ) + ), + currency: T.nilable(String), + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration), + external_price_id: T.nilable(String), + fixed_price_quantity: T.nilable(Float), + invoice_grouping_key: T.nilable(String), + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration), + license_type_id: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + reference_id: T.nilable(String) + } + ) + end + def to_hash end # The cadence to bill for this price on. @@ -4164,7 +6872,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -4172,51 +6880,111 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol ] ) end def self.values end end + + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::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 TieredWithProration < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Internal::AnyHash ) end @@ -4224,11 +6992,27 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol ) end attr_accessor :cadence + # Configuration for cumulative_grouped_allocation pricing + sig do + returns( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + ) + end + attr_reader :cumulative_grouped_allocation_config + + sig do + params( + cumulative_grouped_allocation_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::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 @@ -4241,22 +7025,6 @@ module Orb sig { returns(String) } attr_accessor :name - # Configuration for tiered_with_proration pricing - sig do - returns( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig - ) - end - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - # The id of the billable metric for the price. Only needed if the price is # usage-based. sig { returns(T.nilable(String)) } @@ -4358,11 +7126,11 @@ module Orb sig do params( cadence: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, item_id: String, name: String, - tiered_with_proration_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4392,12 +7160,12 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, + # Configuration for cumulative_grouped_allocation pricing + cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, # The id of the billable metric for the price. Only needed if the price is # usage-based. billable_metric_id: nil, @@ -4436,7 +7204,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered_with_proration + model_type: :cumulative_grouped_allocation ) end @@ -4444,12 +7212,12 @@ module Orb override.returns( { cadence: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, model_type: Symbol, name: String, - tiered_with_proration_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -4487,7 +7255,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -4495,38 +7263,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol ] ) end @@ -4534,102 +7302,72 @@ module Orb end end - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, Orb::Internal::AnyHash ) end - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - ) - end - attr_accessor :tiers + # The overall allocation across all groups + sig { returns(String) } + attr_accessor :cumulative_allocation - # Configuration for tiered_with_proration pricing + # 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( - tiers: - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String ).returns(T.attached_class) end def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: + # The 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( { - tiers: - T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } ) end def to_hash end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier, - Orb::Internal::AnyHash - ) - end - - # Inclusive tier starting value - sig { returns(String) } - attr_accessor :tier_lower_bound - - # Amount per unit - sig { returns(String) } - attr_accessor :unit_amount - - # Configuration for a single tiered with proration tier - sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) - end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end - - sig do - override.returns( - { tier_lower_bound: String, unit_amount: String } - ) - end - def to_hash - end - end end end - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Internal::AnyHash ) end @@ -4637,26 +7375,26 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for grouped_with_min_max_thresholds pricing + # Configuration for daily_credit_allowance pricing sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig ) end - attr_reader :grouped_with_min_max_thresholds_config + attr_reader :daily_credit_allowance_config sig do params( - grouped_with_min_max_thresholds_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + daily_credit_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash ).void end - attr_writer :grouped_with_min_max_thresholds_config + attr_writer :daily_credit_allowance_config # The id of the item the price will be associated with. sig { returns(String) } @@ -4771,9 +7509,9 @@ module Orb sig do params( cadence: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash, item_id: String, name: String, billable_metric_id: T.nilable(String), @@ -4805,8 +7543,8 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, + # Configuration for daily_credit_allowance pricing + daily_credit_allowance_config:, # The id of the item the price will be associated with. item_id:, # The name of the price. @@ -4849,7 +7587,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :grouped_with_min_max_thresholds + model_type: :daily_credit_allowance ) end @@ -4857,9 +7595,9 @@ module Orb override.returns( { cadence: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::OrSymbol, + daily_credit_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, model_type: Symbol, name: String, @@ -4900,7 +7638,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -4908,38 +7646,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence::TaggedSymbol ] ) end @@ -4947,72 +7685,144 @@ module Orb end end - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, Orb::Internal::AnyHash ) end - # The event property used to group before applying thresholds + # Credits granted per day. Lose-it-or-use-it; does not roll over. sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :daily_allowance - # The maximum amount to charge each group + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value sig { returns(String) } - attr_accessor :maximum_charge + attr_accessor :default_unit_amount - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge + # One or two event property values to evaluate matrix groups by + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimensions - # The base price charged per group + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. sig { returns(String) } - attr_accessor :per_unit_rate + attr_accessor :event_day_property - # Configuration for grouped_with_min_max_thresholds pricing + # Per-dimension credit rates + sig do + returns( + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] + ) + end + attr_accessor :matrix_values + + # Configuration for daily_credit_allowance pricing sig do params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash + ] ).returns(T.attached_class) end def self.new( - # The 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: + # Credits granted per day. Lose-it-or-use-it; does not roll over. + daily_allowance:, + # Default per-unit credit rate for any usage not bucketed into a specified + # matrix_value + default_unit_amount:, + # One or two event property values to evaluate matrix groups by + dimensions:, + # Event property whose value identifies the day bucket the event belongs to (e.g. + # 'event_day' set to an ISO date string in the customer's timezone). The allowance + # resets per distinct value of this property. + event_day_property:, + # Per-dimension credit rates + matrix_values: ) end sig do override.returns( { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: T::Array[T.nilable(String)], + event_day_property: String, + matrix_values: + T::Array[ + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue + ] } ) end def to_hash end + + class MatrixValue < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue, + Orb::Internal::AnyHash + ) + end + + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + sig { returns(T::Array[T.nilable(String)]) } + attr_accessor :dimension_values + + # Credits charged per unit of usage matching the specified dimension_values + sig { returns(String) } + attr_accessor :unit_amount + + # Per-dimension credit price for the daily credit allowance model. + sig do + params( + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + ).returns(T.attached_class) + end + def self.new( + # One or two matrix keys to filter usage to this value by. For example, ["model"] + # could be used to apply a different credit rate to each AI model. + dimension_values:, + # Credits charged per unit of usage matching the specified dimension_values + unit_amount: + ) + end + + sig do + override.returns( + { + dimension_values: T::Array[T.nilable(String)], + unit_amount: String + } + ) + end + def to_hash + end + end end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, Orb::Internal::AnyHash ) end @@ -5020,30 +7830,30 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for cumulative_grouped_allocation pricing + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id + + # Configuration for metered_allowance pricing sig do returns( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig ) end - attr_reader :cumulative_grouped_allocation_config + attr_reader :metered_allowance_config sig do params( - cumulative_grouped_allocation_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + metered_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig::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 + attr_writer :metered_allowance_config # The pricing model type sig { returns(Symbol) } @@ -5154,10 +7964,10 @@ module Orb sig do params( cadence: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -5188,10 +7998,10 @@ module Orb def self.new( # The cadence to bill for this price on. cadence:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, # The id of the item the price will be associated with. item_id:, + # Configuration for metered_allowance pricing + metered_allowance_config:, # The name of the price. name:, # The id of the billable metric for the price. Only needed if the price is @@ -5232,7 +8042,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :cumulative_grouped_allocation + model_type: :metered_allowance ) end @@ -5240,10 +8050,10 @@ module Orb override.returns( { cadence: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence::OrSymbol, item_id: String, + metered_allowance_config: + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -5283,7 +8093,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -5291,38 +8101,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence::TaggedSymbol ] ) end @@ -5330,59 +8140,91 @@ module Orb end end - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, Orb::Internal::AnyHash ) end - # The overall allocation across all groups + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. sig { returns(String) } - attr_accessor :cumulative_allocation + attr_accessor :allowance_grouping_value - # The allocation per individual group + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. sig { returns(String) } - attr_accessor :group_allocation + attr_accessor :consumption_grouping_value - # The event property used to group usage before applying allocations + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. sig { returns(String) } attr_accessor :grouping_key - # The amount to charge for each unit outside of the allocation + # Per-unit price applied to gross consumption and to the allowance credit. sig { returns(String) } attr_accessor :unit_amount - # Configuration for cumulative_grouped_allocation pricing + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + sig { returns(T.nilable(String)) } + attr_reader :allowance_display_name + + sig { params(allowance_display_name: String).void } + attr_writer :allowance_display_name + + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + sig { returns(T.nilable(String)) } + attr_reader :consumption_display_name + + sig { params(consumption_display_name: String).void } + attr_writer :consumption_display_name + + # Configuration for metered_allowance pricing sig do params( - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String ).returns(T.attached_class) end def self.new( - # The overall allocation across all groups - cumulative_allocation:, - # The allocation per individual group - group_allocation:, - # The event property used to group usage before applying allocations + # The grouping_key value whose summed quantity represents the allowance for this + # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption + # — credit can never exceed actual usage. + allowance_grouping_value:, + # The grouping_key value whose summed quantity represents consumption (e.g. + # 'download'). Charged at unit_amount. + consumption_grouping_value:, + # Event property used to partition the metric into consumption and allowance + # quantities (e.g. 'event_name'). The metric is queried with this key and the two + # values below select which partition is which. grouping_key:, - # The amount to charge for each unit outside of the allocation - unit_amount: + # Per-unit price applied to gross consumption and to the allowance credit. + unit_amount:, + # Sub-line label for the credit row (e.g. 'Up to 3x free egress'). + allowance_display_name: nil, + # Sub-line label for the gross consumption row (e.g. 'bytes gotten'). + consumption_display_name: nil ) end sig do override.returns( { - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } ) end diff --git a/rbi/orb/resources/alerts.rbi b/rbi/orb/resources/alerts.rbi index bd56b8ff..50d53eba 100644 --- a/rbi/orb/resources/alerts.rbi +++ b/rbi/orb/resources/alerts.rbi @@ -155,7 +155,19 @@ module Orb type: Orb::AlertCreateForSubscriptionParams::Type::OrSymbol, grouping_keys: T.nilable(T::Array[String]), metric_id: T.nilable(String), + price_filters: + T.nilable( + T::Array[ + Orb::AlertCreateForSubscriptionParams::PriceFilter::OrHash + ] + ), pricing_unit_id: T.nilable(String), + threshold_overrides: + T.nilable( + T::Array[ + Orb::AlertCreateForSubscriptionParams::ThresholdOverride::OrHash + ] + ), request_options: Orb::RequestOptions::OrHash ).returns(Orb::Alert) end @@ -170,9 +182,19 @@ module Orb grouping_keys: nil, # The metric to track usage for. metric_id: nil, + # Filters to scope which prices are included in grouped cost alert evaluation. + # Supports filtering by price_id, item_id, or price_type with includes/excludes + # operators. Only applicable when grouping_keys is set. + price_filters: nil, # The pricing unit to use for grouped cost alerts. Required when grouping_keys is # set. pricing_unit_id: nil, + # Per-group threshold overrides. Each override maps a specific combination of + # grouping_keys values to a list of thresholds that fully replaces the default + # thresholds for that group. An empty thresholds list silences the group. Groups + # without an override use the default thresholds. Only applicable when + # grouping_keys is set. + threshold_overrides: nil, request_options: {} ) end diff --git a/rbi/orb/resources/customers.rbi b/rbi/orb/resources/customers.rbi index c48ed64f..f86a3a8b 100644 --- a/rbi/orb/resources/customers.rbi +++ b/rbi/orb/resources/customers.rbi @@ -225,11 +225,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -241,6 +243,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -271,6 +274,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -292,6 +296,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -480,11 +485,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -496,6 +503,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -526,6 +534,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -547,6 +556,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | @@ -847,11 +857,13 @@ module Orb # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | + # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | @@ -863,6 +875,7 @@ module Orb # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | + # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | @@ -893,6 +906,7 @@ module Orb # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | + # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | @@ -914,6 +928,7 @@ module Orb # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | + # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | diff --git a/rbi/orb/resources/customers/credits/ledger.rbi b/rbi/orb/resources/customers/credits/ledger.rbi index d71f50da..442bfb81 100644 --- a/rbi/orb/resources/customers/credits/ledger.rbi +++ b/rbi/orb/resources/customers/credits/ledger.rbi @@ -194,11 +194,17 @@ module Orb # ## Deducting Credits # # Orb allows you to deduct credits from a customer by creating an entry of type - # `decrement`. Orb matches the algorithm for automatic deductions for determining - # which credit blocks to decrement from. In the case that the deduction leads to - # multiple ledger entries, the response from this endpoint will be the final - # deduction. Orb also optionally allows specifying a description to assist with - # auditing. + # `decrement`. A `decrement` entry records credits as usage and immediately + # recognizes revenue at the block's `per_unit_cost_basis`. + # + # For most credit removals, use `void` (no revenue impact) or `expiration_change` + # (revenue recognized on expiration) instead. Only use `decrement` when credits + # were genuinely consumed outside of normal event ingestion. + # + # Orb matches the algorithm for automatic deductions for determining which credit + # blocks to decrement from. In the case that the deduction leads to multiple + # ledger entries, the response from this endpoint will be the final deduction. Orb + # also optionally allows specifying a description to assist with auditing. # # The following snippet illustrates a sample request body to decrement credits. # @@ -330,11 +336,17 @@ module Orb # ## Deducting Credits # # Orb allows you to deduct credits from a customer by creating an entry of type - # `decrement`. Orb matches the algorithm for automatic deductions for determining - # which credit blocks to decrement from. In the case that the deduction leads to - # multiple ledger entries, the response from this endpoint will be the final - # deduction. Orb also optionally allows specifying a description to assist with - # auditing. + # `decrement`. A `decrement` entry records credits as usage and immediately + # recognizes revenue at the block's `per_unit_cost_basis`. + # + # For most credit removals, use `void` (no revenue impact) or `expiration_change` + # (revenue recognized on expiration) instead. Only use `decrement` when credits + # were genuinely consumed outside of normal event ingestion. + # + # Orb matches the algorithm for automatic deductions for determining which credit + # blocks to decrement from. In the case that the deduction leads to multiple + # ledger entries, the response from this endpoint will be the final deduction. Orb + # also optionally allows specifying a description to assist with auditing. # # The following snippet illustrates a sample request body to decrement credits. # diff --git a/rbi/orb/resources/invoices.rbi b/rbi/orb/resources/invoices.rbi index 44cd2197..8d2a6183 100644 --- a/rbi/orb/resources/invoices.rbi +++ b/rbi/orb/resources/invoices.rbi @@ -136,6 +136,10 @@ module Orb # When fetching any `draft` invoices, this returns the last-computed invoice # values for each draft invoice, which may not always be up-to-date since Orb # regularly refreshes invoices asynchronously. + # + # If you don't need line item details, minimums, maximums, or discounts, prefer + # the [list invoices summary](/api-reference/invoice/list-invoices-summary) + # endpoint for better performance. sig do params( amount: T.nilable(String), diff --git a/rbi/orb/resources/metrics.rbi b/rbi/orb/resources/metrics.rbi index 1a14d0df..b484084f 100644 --- a/rbi/orb/resources/metrics.rbi +++ b/rbi/orb/resources/metrics.rbi @@ -56,9 +56,8 @@ module Orb ) end - # This endpoint is used to fetch [metric](/core-concepts##metric) details given a - # metric identifier. It returns information about the metrics including its name, - # description, and item. + # This endpoint is used to list [metrics](/core-concepts#metric). It returns + # information about the metrics including its name, description, and item. sig do params( created_at_gt: T.nilable(Time), @@ -84,8 +83,9 @@ module Orb ) end - # This endpoint is used to list [metrics](/core-concepts#metric). It returns - # information about the metrics including its name, description, and item. + # This endpoint is used to fetch [metric](/core-concepts#metric) details given a + # metric identifier. It returns information about the metrics including its name, + # description, and item. sig do params( metric_id: String, diff --git a/rbi/orb/resources/plans.rbi b/rbi/orb/resources/plans.rbi index ff6c8155..16a92e69 100644 --- a/rbi/orb/resources/plans.rbi +++ b/rbi/orb/resources/plans.rbi @@ -30,6 +30,7 @@ module Orb adjustments: T.nilable(T::Array[Orb::PlanCreateParams::Adjustment::OrHash]), default_invoice_memo: T.nilable(String), + description: T.nilable(String), external_plan_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), net_terms: T.nilable(Integer), @@ -52,6 +53,8 @@ module Orb adjustments: nil, # Free-form text which is available on the invoice PDF and the Orb invoice portal. default_invoice_memo: nil, + # An optional user-defined description of the plan. + description: nil, external_plan_id: nil, # User-specified key/value pairs for the resource. Individual keys can be removed # by setting the value to `null`, and the entire metadata mapping can be cleared @@ -71,13 +74,14 @@ module Orb ) end - # This endpoint can be used to update the `external_plan_id`, and `metadata` of an - # existing plan. + # This endpoint can be used to update the `external_plan_id`, `description`, and + # `metadata` of an existing plan. # # Other fields on a plan are currently immutable. sig do params( plan_id: String, + description: T.nilable(String), external_plan_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: Orb::RequestOptions::OrHash @@ -85,6 +89,8 @@ module Orb end def update( plan_id, + # An optional user-defined description of the plan. + description: nil, # An optional user-defined ID for this plan resource, used throughout the system # as an alias for this Plan. Use this field to identify a plan by an existing # identifier in your system. diff --git a/rbi/orb/resources/plans/external_plan_id.rbi b/rbi/orb/resources/plans/external_plan_id.rbi index 98ba3f09..56f45895 100644 --- a/rbi/orb/resources/plans/external_plan_id.rbi +++ b/rbi/orb/resources/plans/external_plan_id.rbi @@ -8,13 +8,14 @@ module Orb # subscription. You can see more about how to configure prices in the # [Price resource](/reference/price). class ExternalPlanID - # This endpoint can be used to update the `external_plan_id`, and `metadata` of an - # existing plan. + # This endpoint can be used to update the `external_plan_id`, `description`, and + # `metadata` of an existing plan. # # Other fields on a plan are currently immutable. sig do params( other_external_plan_id: String, + description: T.nilable(String), external_plan_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: Orb::RequestOptions::OrHash @@ -22,6 +23,8 @@ module Orb end def update( other_external_plan_id, + # An optional user-defined description of the plan. + description: nil, # An optional user-defined ID for this plan resource, used throughout the system # as an alias for this Plan. Use this field to identify a plan by an existing # identifier in your system. diff --git a/rbi/orb/resources/prices.rbi b/rbi/orb/resources/prices.rbi index c2143f9f..e43262a3 100644 --- a/rbi/orb/resources/prices.rbi +++ b/rbi/orb/resources/prices.rbi @@ -54,6 +54,7 @@ module Orb Orb::NewFloatingPackageWithAllocationPrice::OrHash, Orb::NewFloatingUnitWithPercentPrice::OrHash, Orb::NewFloatingMatrixWithAllocationPrice::OrHash, + Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::OrHash, Orb::NewFloatingTieredWithProrationPrice::OrHash, Orb::NewFloatingUnitWithProrationPrice::OrHash, Orb::NewFloatingGroupedAllocationPrice::OrHash, @@ -68,6 +69,8 @@ module Orb Orb::NewFloatingScalableMatrixWithTieredPricingPrice::OrHash, Orb::NewFloatingCumulativeGroupedBulkPrice::OrHash, Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::OrHash, + Orb::PriceCreateParams::Body::DailyCreditAllowance::OrHash, + Orb::PriceCreateParams::Body::MeteredAllowance::OrHash, Orb::NewFloatingMinimumCompositePrice::OrHash, Orb::PriceCreateParams::Body::Percent::OrHash, Orb::PriceCreateParams::Body::EventOutput::OrHash diff --git a/rbi/orb/resources/subscriptions.rbi b/rbi/orb/resources/subscriptions.rbi index 79581a6a..f461ad8b 100644 --- a/rbi/orb/resources/subscriptions.rbi +++ b/rbi/orb/resources/subscriptions.rbi @@ -1415,6 +1415,12 @@ module Orb # To be eligible, the subscription must currently be active and have a future # cancellation. This operation will turn on auto-renew, ensuring that the # subscription does not end at the currently scheduled cancellation time. + # + # Note: uncancellation is a lossy operation. Price intervals that were cut short + # by the cancellation are extended to infinity (original end dates are lost), and + # future intervals or phases scheduled after the cancellation time are permanently + # deleted. For complex subscriptions with phases or scheduled plan changes, + # consider creating a new plan change instead of uncancelling. sig do params( subscription_id: String, diff --git a/scripts/bootstrap b/scripts/bootstrap index 34878642..a5e1b80a 100755 --- a/scripts/bootstrap +++ b/scripts/bootstrap @@ -4,7 +4,7 @@ set -e cd -- "$(dirname -- "$0")/.." -if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then +if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "${SKIP_BREW:-}" != "1" ] && [ -t 0 ]; then brew bundle check >/dev/null 2>&1 || { echo -n "==> Install Homebrew dependencies? (y/N): " read -r response diff --git a/scripts/mock b/scripts/mock index 886f2ffc..04d29019 100755 --- a/scripts/mock +++ b/scripts/mock @@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}" # Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stdy/cli@0.20.2 -- steady --version + npm exec --package=@stdy/cli@0.22.1 -- steady --version - npm exec --package=@stdy/cli@0.20.2 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.22.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.20.2 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" + npm exec --package=@stdy/cli@0.22.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" fi diff --git a/scripts/test b/scripts/test index 9fc2510b..ad94c14b 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.20.2 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.22.1 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}" echo exit 1 diff --git a/sig/orb/models/accounting_provider_config.rbs b/sig/orb/models/accounting_provider_config.rbs index c80ba348..71171479 100644 --- a/sig/orb/models/accounting_provider_config.rbs +++ b/sig/orb/models/accounting_provider_config.rbs @@ -1,19 +1,36 @@ module Orb module Models type accounting_provider_config = - { external_provider_id: String, provider_type: String } + { + external_provider_id: String, + provider_type: Orb::Models::AccountingProviderConfig::provider_type + } class AccountingProviderConfig < Orb::Internal::Type::BaseModel attr_accessor external_provider_id: String - attr_accessor provider_type: String + attr_accessor provider_type: Orb::Models::AccountingProviderConfig::provider_type def initialize: ( external_provider_id: String, - provider_type: String + provider_type: Orb::Models::AccountingProviderConfig::provider_type ) -> void - def to_hash: -> { external_provider_id: String, provider_type: String } + def to_hash: -> { + external_provider_id: String, + provider_type: Orb::Models::AccountingProviderConfig::provider_type + } + + type provider_type = :quickbooks | :netsuite + + module ProviderType + extend Orb::Internal::Type::Enum + + QUICKBOOKS: :quickbooks + NETSUITE: :netsuite + + def self?.values: -> ::Array[Orb::Models::AccountingProviderConfig::provider_type] + end end end end diff --git a/sig/orb/models/alert.rbs b/sig/orb/models/alert.rbs index 3f5fe7d8..9348529a 100644 --- a/sig/orb/models/alert.rbs +++ b/sig/orb/models/alert.rbs @@ -14,7 +14,9 @@ module Orb type: Orb::Models::Alert::type_, balance_alert_status: ::Array[Orb::Alert::BalanceAlertStatus]?, grouping_keys: ::Array[String]?, - license_type: Orb::Alert::LicenseType? + license_type: Orb::Alert::LicenseType?, + price_filters: ::Array[Orb::Alert::PriceFilter]?, + threshold_overrides: ::Array[Orb::Alert::ThresholdOverride]? } class Alert < Orb::Internal::Type::BaseModel @@ -44,6 +46,10 @@ module Orb attr_accessor license_type: Orb::Alert::LicenseType? + attr_accessor price_filters: ::Array[Orb::Alert::PriceFilter]? + + attr_accessor threshold_overrides: ::Array[Orb::Alert::ThresholdOverride]? + def initialize: ( id: String, created_at: Time, @@ -57,7 +63,9 @@ module Orb type: Orb::Models::Alert::type_, ?balance_alert_status: ::Array[Orb::Alert::BalanceAlertStatus]?, ?grouping_keys: ::Array[String]?, - ?license_type: Orb::Alert::LicenseType? + ?license_type: Orb::Alert::LicenseType?, + ?price_filters: ::Array[Orb::Alert::PriceFilter]?, + ?threshold_overrides: ::Array[Orb::Alert::ThresholdOverride]? ) -> void def to_hash: -> { @@ -73,7 +81,9 @@ module Orb type: Orb::Models::Alert::type_, balance_alert_status: ::Array[Orb::Alert::BalanceAlertStatus]?, grouping_keys: ::Array[String]?, - license_type: Orb::Alert::LicenseType? + license_type: Orb::Alert::LicenseType?, + price_filters: ::Array[Orb::Alert::PriceFilter]?, + threshold_overrides: ::Array[Orb::Alert::ThresholdOverride]? } type metric = { id: String } @@ -160,6 +170,78 @@ module Orb def to_hash: -> { id: String } end + + type price_filter = + { + field: Orb::Models::Alert::PriceFilter::field, + operator: Orb::Models::Alert::PriceFilter::operator, + values: ::Array[String] + } + + class PriceFilter < Orb::Internal::Type::BaseModel + attr_accessor field: Orb::Models::Alert::PriceFilter::field + + attr_accessor operator: Orb::Models::Alert::PriceFilter::operator + + attr_accessor values: ::Array[String] + + def initialize: ( + field: Orb::Models::Alert::PriceFilter::field, + operator: Orb::Models::Alert::PriceFilter::operator, + values: ::Array[String] + ) -> void + + def to_hash: -> { + field: Orb::Models::Alert::PriceFilter::field, + operator: Orb::Models::Alert::PriceFilter::operator, + values: ::Array[String] + } + + type field = + :price_id | :item_id | :price_type | :currency | :pricing_unit_id + + module Field + extend Orb::Internal::Type::Enum + + PRICE_ID: :price_id + ITEM_ID: :item_id + PRICE_TYPE: :price_type + CURRENCY: :currency + PRICING_UNIT_ID: :pricing_unit_id + + def self?.values: -> ::Array[Orb::Models::Alert::PriceFilter::field] + end + + type operator = :includes | :excludes + + module Operator + extend Orb::Internal::Type::Enum + + INCLUDES: :includes + EXCLUDES: :excludes + + def self?.values: -> ::Array[Orb::Models::Alert::PriceFilter::operator] + end + end + + type threshold_override = + { group_values: ::Array[String], thresholds: ::Array[Orb::Threshold] } + + class ThresholdOverride < Orb::Internal::Type::BaseModel + attr_accessor group_values: ::Array[String] + + attr_accessor thresholds: ::Array[Orb::Threshold] + + def initialize: ( + group_values: ::Array[String], + thresholds: ::Array[Orb::Threshold] + ) -> void + + def to_hash: -> { + group_values: ::Array[String], + thresholds: ::Array[Orb::Threshold] + } + end end end end diff --git a/sig/orb/models/alert_create_for_subscription_params.rbs b/sig/orb/models/alert_create_for_subscription_params.rbs index cbd8c259..512d4c96 100644 --- a/sig/orb/models/alert_create_for_subscription_params.rbs +++ b/sig/orb/models/alert_create_for_subscription_params.rbs @@ -7,7 +7,9 @@ module Orb type: Orb::Models::AlertCreateForSubscriptionParams::type_, grouping_keys: ::Array[String]?, metric_id: String?, - pricing_unit_id: String? + price_filters: ::Array[Orb::AlertCreateForSubscriptionParams::PriceFilter]?, + pricing_unit_id: String?, + threshold_overrides: ::Array[Orb::AlertCreateForSubscriptionParams::ThresholdOverride]? } & Orb::Internal::Type::request_parameters @@ -25,15 +27,21 @@ module Orb attr_accessor metric_id: String? + attr_accessor price_filters: ::Array[Orb::AlertCreateForSubscriptionParams::PriceFilter]? + attr_accessor pricing_unit_id: String? + attr_accessor threshold_overrides: ::Array[Orb::AlertCreateForSubscriptionParams::ThresholdOverride]? + def initialize: ( subscription_id: String, thresholds: ::Array[Orb::Threshold], type: Orb::Models::AlertCreateForSubscriptionParams::type_, ?grouping_keys: ::Array[String]?, ?metric_id: String?, + ?price_filters: ::Array[Orb::AlertCreateForSubscriptionParams::PriceFilter]?, ?pricing_unit_id: String?, + ?threshold_overrides: ::Array[Orb::AlertCreateForSubscriptionParams::ThresholdOverride]?, ?request_options: Orb::request_opts ) -> void @@ -43,7 +51,9 @@ module Orb type: Orb::Models::AlertCreateForSubscriptionParams::type_, grouping_keys: ::Array[String]?, metric_id: String?, + price_filters: ::Array[Orb::AlertCreateForSubscriptionParams::PriceFilter]?, pricing_unit_id: String?, + threshold_overrides: ::Array[Orb::AlertCreateForSubscriptionParams::ThresholdOverride]?, request_options: Orb::RequestOptions } @@ -57,6 +67,78 @@ module Orb def self?.values: -> ::Array[Orb::Models::AlertCreateForSubscriptionParams::type_] end + + type price_filter = + { + field: Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::field, + operator: Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::operator, + values: ::Array[String] + } + + class PriceFilter < Orb::Internal::Type::BaseModel + attr_accessor field: Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::field + + attr_accessor operator: Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::operator + + attr_accessor values: ::Array[String] + + def initialize: ( + field: Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::field, + operator: Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::operator, + values: ::Array[String] + ) -> void + + def to_hash: -> { + field: Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::field, + operator: Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::operator, + values: ::Array[String] + } + + type field = + :price_id | :item_id | :price_type | :currency | :pricing_unit_id + + module Field + extend Orb::Internal::Type::Enum + + PRICE_ID: :price_id + ITEM_ID: :item_id + PRICE_TYPE: :price_type + CURRENCY: :currency + PRICING_UNIT_ID: :pricing_unit_id + + def self?.values: -> ::Array[Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::field] + end + + type operator = :includes | :excludes + + module Operator + extend Orb::Internal::Type::Enum + + INCLUDES: :includes + EXCLUDES: :excludes + + def self?.values: -> ::Array[Orb::Models::AlertCreateForSubscriptionParams::PriceFilter::operator] + end + end + + type threshold_override = + { group_values: ::Array[String], thresholds: ::Array[Orb::Threshold] } + + class ThresholdOverride < Orb::Internal::Type::BaseModel + attr_accessor group_values: ::Array[String] + + attr_accessor thresholds: ::Array[Orb::Threshold] + + def initialize: ( + group_values: ::Array[String], + thresholds: ::Array[Orb::Threshold] + ) -> void + + def to_hash: -> { + group_values: ::Array[String], + thresholds: ::Array[Orb::Threshold] + } + end end end end diff --git a/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs b/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs index 54aba461..5edaee85 100644 --- a/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +++ b/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs @@ -101,7 +101,7 @@ module Orb type add_price = { allocation_price: Orb::NewAllocationPrice?, - license_allocation_price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::license_allocation_price?, + license_allocation_price: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice?, plan_phase_order: Integer?, price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::price? } @@ -109,7 +109,7 @@ module Orb class AddPrice < Orb::Internal::Type::BaseModel attr_accessor allocation_price: Orb::NewAllocationPrice? - attr_accessor license_allocation_price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::license_allocation_price? + attr_accessor license_allocation_price: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice? attr_accessor plan_phase_order: Integer? @@ -117,67 +117,235 @@ module Orb def initialize: ( ?allocation_price: Orb::NewAllocationPrice?, - ?license_allocation_price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::license_allocation_price?, + ?license_allocation_price: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice?, ?plan_phase_order: Integer?, ?price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::price? ) -> void def to_hash: -> { allocation_price: Orb::NewAllocationPrice?, - license_allocation_price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::license_allocation_price?, + license_allocation_price: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice?, plan_phase_order: Integer?, price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::price? } type license_allocation_price = - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent - | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput - - module LicenseAllocationPrice + { + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::cadence + + attr_accessor item_id: String + + attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation] + + attr_accessor model_type: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::model_type + + attr_accessor name: String + + attr_accessor unit_config: Orb::UnitConfig + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: 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::cadence, + item_id: String, + license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String? + ) -> void + + def to_hash: -> { + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::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::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 model_type = :unit + + module ModelType + extend Orb::Internal::Type::Enum + + UNIT: :unit + + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::model_type] + end + end + + type price = + Orb::NewPlanUnitPrice + | Orb::NewPlanTieredPrice + | Orb::NewPlanBulkPrice + | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters + | Orb::NewPlanPackagePrice + | Orb::NewPlanMatrixPrice + | Orb::NewPlanThresholdTotalAmountPrice + | Orb::NewPlanTieredPackagePrice + | Orb::NewPlanTieredWithMinimumPrice + | Orb::NewPlanGroupedTieredPrice + | Orb::NewPlanTieredPackageWithMinimumPrice + | Orb::NewPlanPackageWithAllocationPrice + | Orb::NewPlanUnitWithPercentPrice + | Orb::NewPlanMatrixWithAllocationPrice + | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts + | 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::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance + | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance + | Orb::NewPlanMinimumCompositePrice + | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent + | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput + + module Price extend Orb::Internal::Type::Union - type unit = + type bulk_with_filters = { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::cadence, + bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation], - model_type: :unit, + model_type: :bulk_with_filters, name: String, - unit_config: Orb::UnitConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -189,19 +357,17 @@ module Orb reference_id: String? } - class Unit < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::cadence + 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 license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation] - - attr_accessor model_type: :unit + attr_accessor model_type: :bulk_with_filters attr_accessor name: String - attr_accessor unit_config: Orb::UnitConfig - attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -210,7 +376,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config? attr_accessor currency: String? @@ -231,16 +397,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::cadence, + bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation], name: String, - unit_config: Orb::UnitConfig, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -250,21 +415,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :unit + ?model_type: :bulk_with_filters ) -> void def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::cadence, + bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation], - model_type: :unit, + model_type: :bulk_with_filters, name: String, - unit_config: Orb::UnitConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -276,6 +440,64 @@ 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 @@ -294,46 +516,22 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence] end end - type tiered = + type matrix_with_threshold_discounts = { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation], - model_type: :tiered, + matrix_with_threshold_discounts_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, name: String, - tiered_config: Orb::TieredConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -345,19 +543,17 @@ module Orb reference_id: String? } - class Tiered < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence attr_accessor item_id: String - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation] + attr_accessor matrix_with_threshold_discounts_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig - attr_accessor model_type: :tiered + attr_accessor model_type: :matrix_with_threshold_discounts attr_accessor name: String - attr_accessor tiered_config: Orb::TieredConfig - attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -366,7 +562,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config? attr_accessor currency: String? @@ -387,16 +583,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation], + matrix_with_threshold_discounts_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, name: String, - tiered_config: Orb::TieredConfig, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -406,21 +601,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :tiered + ?model_type: :matrix_with_threshold_discounts ) -> void def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation], - model_type: :tiered, + matrix_with_threshold_discounts_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, name: String, - tiered_config: Orb::TieredConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -450,46 +644,127 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence] + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence] end - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } + type matrix_with_threshold_discounts_config = + { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor first_dimension: String + + attr_accessor matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + attr_accessor second_dimension: String? - attr_accessor currency: String + attr_reader threshold_discount_groups: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup]? - attr_accessor write_off_overage: bool? + def threshold_discount_groups=: ( + ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + ?second_dimension: String?, + ?threshold_discount_groups: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] ) -> void def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] } + + type matrix_value = + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor first_dimension_value: String + + attr_accessor unit_amount: String + + attr_accessor second_dimension_value: String? + + def initialize: ( + first_dimension_value: String, + unit_amount: String, + ?second_dimension_value: String? + ) -> void + + def to_hash: -> { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + end + + type threshold_discount_group = + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + attr_accessor above_threshold_discount_percentage: String + + attr_accessor below_threshold_discount_percentage: String + + attr_accessor cell_coordinates: String + + attr_accessor threshold_amount: String + + attr_accessor description: String? + + def initialize: ( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + ?description: String? + ) -> void + + def to_hash: -> { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + end end end - type bulk = + type tiered_with_proration = { - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation], - model_type: :bulk, + model_type: :tiered_with_proration, name: String, + tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -501,19 +776,17 @@ module Orb reference_id: String? } - class Bulk < Orb::Internal::Type::BaseModel - attr_accessor bulk_config: Orb::BulkConfig - - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::cadence + class TieredWithProration < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence attr_accessor item_id: String - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation] - - attr_accessor model_type: :bulk + attr_accessor model_type: :tiered_with_proration attr_accessor name: String + attr_accessor tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig + attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -522,7 +795,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config? attr_accessor currency: String? @@ -543,16 +816,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation], name: String, + tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -562,21 +834,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :bulk + ?model_type: :tiered_with_proration ) -> void def to_hash: -> { - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation], - model_type: :bulk, + model_type: :tiered_with_proration, name: String, + tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -606,46 +877,57 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::cadence] + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::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 + type tiered_with_proration_config = + { + tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + } - attr_accessor write_off_overage: bool? + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? + tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] ) -> void def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? + 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 bulk_with_filters = + type grouped_with_min_max_thresholds = { - bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence, + grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - model_type: :bulk_with_filters, + 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::BulkWithFilters::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -657,16 +939,14 @@ module Orb reference_id: String? } - class BulkWithFilters < Orb::Internal::Type::BaseModel - attr_accessor bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::cadence + attr_accessor grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig attr_accessor item_id: String - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation] - - attr_accessor model_type: :bulk_with_filters + attr_accessor model_type: :grouped_with_min_max_thresholds attr_accessor name: String @@ -678,7 +958,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config? attr_accessor currency: String? @@ -699,16 +979,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence, + grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], name: String, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -718,21 +997,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :bulk_with_filters + ?model_type: :grouped_with_min_max_thresholds ) -> void def to_hash: -> { - bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence, + grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - model_type: :bulk_with_filters, + 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::BulkWithFilters::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -744,64 +1022,6 @@ module Orb reference_id: String? } - type bulk_with_filters_config = - { - filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - attr_accessor filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter] - - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - - def initialize: ( - filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - ) -> void - - def to_hash: -> { - filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - type filter = { property_key: String, property_value: String } - - class Filter < Orb::Internal::Type::BaseModel - attr_accessor property_key: String - - attr_accessor property_value: String - - def initialize: ( - property_key: String, - property_value: String - ) -> void - - def to_hash: -> { - property_key: String, - property_value: String - } - end - - type tier = { unit_amount: String, tier_lower_bound: String? } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - attr_accessor tier_lower_bound: String? - - def initialize: ( - unit_amount: String, - ?tier_lower_bound: String? - ) -> void - - def to_hash: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end - type cadence = :annual | :semi_annual @@ -820,46 +1040,54 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::cadence] + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence] end - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } + 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 - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + attr_accessor maximum_charge: String - attr_accessor currency: String + attr_accessor minimum_charge: String - attr_accessor write_off_overage: bool? + attr_accessor per_unit_rate: String def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String ) -> void def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } end end - type package = + type cumulative_grouped_allocation = { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation], - model_type: :package, + model_type: :cumulative_grouped_allocation, 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?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -871,19 +1099,17 @@ module Orb reference_id: String? } - class Package < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::cadence + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence - attr_accessor item_id: String + attr_accessor cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation] + attr_accessor item_id: String - attr_accessor model_type: :package + attr_accessor model_type: :cumulative_grouped_allocation attr_accessor name: String - attr_accessor package_config: Orb::PackageConfig - attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -892,7 +1118,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config? attr_accessor currency: String? @@ -913,16 +1139,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::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?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -932,21 +1157,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :package + ?model_type: :cumulative_grouped_allocation ) -> void def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation], - model_type: :package, + model_type: :cumulative_grouped_allocation, 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?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -976,46 +1200,54 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::cadence] + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence] end - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } + type cumulative_grouped_allocation_config = + { + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String + } + + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + attr_accessor cumulative_allocation: String - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + attr_accessor group_allocation: String - attr_accessor currency: String + attr_accessor grouping_key: String - attr_accessor write_off_overage: bool? + attr_accessor unit_amount: String def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String ) -> void def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } end end - type matrix = + type daily_credit_allowance = { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - model_type: :matrix, + model_type: :daily_credit_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1027,16 +1259,14 @@ module Orb 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 + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::cadence - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation] + attr_accessor daily_credit_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig - attr_accessor matrix_config: Orb::MatrixConfig + attr_accessor item_id: String - attr_accessor model_type: :matrix + attr_accessor model_type: :daily_credit_allowance attr_accessor name: String @@ -1048,7 +1278,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config? attr_accessor currency: String? @@ -1069,16 +1299,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, 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?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -1088,21 +1317,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :matrix + ?model_type: :daily_credit_allowance ) -> void def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - model_type: :matrix, + model_type: :daily_credit_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1132,46 +1360,78 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::cadence] + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::cadence] end - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } + type daily_credit_allowance_config = + { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + attr_accessor default_unit_amount: String - attr_accessor currency: String + attr_accessor dimensions: ::Array[String?] - attr_accessor write_off_overage: bool? + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] ) -> void def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end end end - type threshold_total_amount = + type metered_allowance = { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - model_type: :threshold_total_amount, + metered_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, 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?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1183,19 +1443,17 @@ module Orb reference_id: String? } - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::cadence attr_accessor item_id: String - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation] + attr_accessor metered_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig - attr_accessor model_type: :threshold_total_amount + attr_accessor model_type: :metered_allowance 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? @@ -1204,7 +1462,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::conversion_rate_config? attr_accessor currency: String? @@ -1225,16 +1483,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], + metered_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, 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?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -1244,21 +1501,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :threshold_total_amount + ?model_type: :metered_allowance ) -> void def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - model_type: :threshold_total_amount, + metered_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, 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?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1288,84 +1544,68 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence] + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::cadence] end - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } + type metered_allowance_config = + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String - attr_accessor currency: String + attr_accessor consumption_grouping_value: String - attr_accessor write_off_overage: bool? + attr_accessor grouping_key: String - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void + attr_accessor unit_amount: String - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end + attr_reader allowance_display_name: String? - type threshold_total_amount_config = - { - consumption_table: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - prorate: bool? - } + def allowance_display_name=: (String) -> String - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - attr_accessor consumption_table: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable] + attr_reader consumption_display_name: String? - attr_accessor prorate: bool? + def consumption_display_name=: (String) -> String def initialize: ( - consumption_table: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - ?prorate: bool? + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String ) -> void def to_hash: -> { - consumption_table: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - prorate: bool? + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } - - 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 = + type percent = { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation], - model_type: :tiered_package, + model_type: :percent, name: String, - tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, + 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::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1377,18 +1617,16 @@ module Orb reference_id: String? } - class TieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::cadence + class Percent < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::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 model_type: :percent attr_accessor name: String - attr_accessor tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig + attr_accessor percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig attr_accessor billable_metric_id: String? @@ -1398,7 +1636,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config? attr_accessor currency: String? @@ -1419,16 +1657,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::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, + 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::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -1438,21 +1675,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :tiered_package + ?model_type: :percent ) -> void def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation], - model_type: :tiered_package, + model_type: :percent, name: String, - tiered_package_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, + 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::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1482,83 +1718,32 @@ module Orb 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? - } + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::cadence] 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 + type percent_config = { percent: Float } - attr_accessor tier_lower_bound: String + class PercentConfig < Orb::Internal::Type::BaseModel + attr_accessor percent: Float - def initialize: ( - per_unit: String, - tier_lower_bound: String - ) -> void + def initialize: (percent: Float) -> void - def to_hash: -> { per_unit: String, tier_lower_bound: String } - end + def to_hash: -> { percent: Float } end end - type tiered_with_minimum = + type event_output = { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence, + event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - model_type: :tiered_with_minimum, + model_type: :event_output, 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?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1570,19 +1755,17 @@ module Orb reference_id: String? } - class TieredWithMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence + 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 license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation] - - attr_accessor model_type: :tiered_with_minimum + attr_accessor model_type: :event_output 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? @@ -1591,7 +1774,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config? attr_accessor currency: String? @@ -1612,16 +1795,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence, + event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::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?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -1631,21 +1813,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :tiered_with_minimum + ?model_type: :event_output ) -> void def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence, + event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - model_type: :tiered_with_minimum, + model_type: :event_output, 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?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1675,10572 +1856,365 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence] + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::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 = + type event_output_config = { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - hide_zero_amount_tiers: bool, - prorate: bool + unit_rating_key: String, + default_unit_rate: String?, + grouping_key: String? } - 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 + class EventOutputConfig < Orb::Internal::Type::BaseModel + attr_accessor unit_rating_key: String - attr_reader prorate: bool? + attr_accessor default_unit_rate: String? - def prorate=: (bool) -> bool + attr_accessor grouping_key: String? def initialize: ( - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - ?hide_zero_amount_tiers: bool, - ?prorate: bool + unit_rating_key: String, + ?default_unit_rate: String?, + ?grouping_key: String? ) -> void def to_hash: -> { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - hide_zero_amount_tiers: bool, - prorate: bool + unit_rating_key: String, + default_unit_rate: String?, + grouping_key: String? } + end + end - type tier = - { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String + def self?.variants: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::price] + end + end - attr_accessor tier_lower_bound: String + type remove_adjustment = + { adjustment_id: String, plan_phase_order: Integer? } - attr_accessor unit_amount: String + class RemoveAdjustment < Orb::Internal::Type::BaseModel + attr_accessor adjustment_id: String - def initialize: ( - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - ) -> void + attr_accessor plan_phase_order: Integer? - def to_hash: -> { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - end - end - end + def initialize: ( + adjustment_id: String, + ?plan_phase_order: Integer? + ) -> void - 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? - } + def to_hash: -> { adjustment_id: String, plan_phase_order: Integer? } + end - class GroupedTiered < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::cadence + type remove_price = { price_id: String, plan_phase_order: Integer? } - attr_accessor grouped_tiered_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig + class RemovePrice < Orb::Internal::Type::BaseModel + attr_accessor price_id: String - attr_accessor item_id: String + attr_accessor plan_phase_order: Integer? - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation] + def initialize: ( + price_id: String, + ?plan_phase_order: Integer? + ) -> void - attr_accessor model_type: :grouped_tiered + def to_hash: -> { price_id: String, plan_phase_order: Integer? } + end - attr_accessor name: String + type replace_adjustment = + { + adjustment: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::adjustment, + replaces_adjustment_id: String, + plan_phase_order: Integer? + } - attr_accessor billable_metric_id: String? + class ReplaceAdjustment < Orb::Internal::Type::BaseModel + attr_accessor adjustment: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::adjustment - attr_accessor billed_in_advance: bool? + attr_accessor replaces_adjustment_id: String - attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + attr_accessor plan_phase_order: Integer? - attr_accessor conversion_rate: Float? + def initialize: ( + adjustment: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::adjustment, + replaces_adjustment_id: String, + ?plan_phase_order: Integer? + ) -> void - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::conversion_rate_config? + def to_hash: -> { + adjustment: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::adjustment, + replaces_adjustment_id: String, + plan_phase_order: Integer? + } - attr_accessor currency: String? + type adjustment = + Orb::NewPercentageDiscount + | Orb::NewUsageDiscount + | Orb::NewAmountDiscount + | Orb::NewMinimum + | Orb::NewMaximum - attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + module Adjustment + extend Orb::Internal::Type::Union - attr_accessor external_price_id: String? + def self?.variants: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::adjustment] + end + end - attr_accessor fixed_price_quantity: Float? + type replace_price = + { + replaces_price_id: String, + allocation_price: Orb::NewAllocationPrice?, + license_allocation_price: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice?, + plan_phase_order: Integer?, + price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::price? + } - attr_accessor invoice_grouping_key: String? + class ReplacePrice < Orb::Internal::Type::BaseModel + attr_accessor replaces_price_id: String - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + attr_accessor allocation_price: Orb::NewAllocationPrice? - attr_accessor license_type_id: String? + attr_accessor license_allocation_price: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice? - attr_accessor metadata: ::Hash[Symbol, String?]? + attr_accessor plan_phase_order: Integer? - attr_accessor reference_id: String? + attr_accessor price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::price? - 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 initialize: ( + replaces_price_id: String, + ?allocation_price: Orb::NewAllocationPrice?, + ?license_allocation_price: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice?, + ?plan_phase_order: Integer?, + ?price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::price? + ) -> void - def to_hash: -> { - 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? - } + def to_hash: -> { + replaces_price_id: String, + allocation_price: Orb::NewAllocationPrice?, + license_allocation_price: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice?, + plan_phase_order: Integer?, + price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::price? + } - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom + type license_allocation_price = + { + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::cadence + + attr_accessor item_id: String + + attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation] + + attr_accessor model_type: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::model_type + + attr_accessor name: String + + attr_accessor unit_config: Orb::UnitConfig + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? - module Cadence - extend Orb::Internal::Type::Enum + attr_accessor invoice_grouping_key: String? - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::cadence] - end + attr_accessor license_type_id: String? - type grouped_tiered_config = - { - grouping_key: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - } + attr_accessor metadata: ::Hash[Symbol, String?]? - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String + attr_accessor reference_id: String? - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] + def initialize: ( + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String? + ) -> void - def initialize: ( - grouping_key: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - ) -> void + def to_hash: -> { + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } - def to_hash: -> { - grouping_key: String, - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] - } + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom - type tier = { tier_lower_bound: String, unit_amount: String } + module Cadence + extend Orb::Internal::Type::Enum - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom - attr_accessor unit_amount: String + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::cadence] + end - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void + type license_allocation = + { amount: String, currency: String, write_off_overage: bool? } - def to_hash: -> { - tier_lower_bound: String, - unit_amount: String - } - end - end + class LicenseAllocation < Orb::Internal::Type::BaseModel + attr_accessor amount: String - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } + attr_accessor currency: String - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + attr_accessor write_off_overage: bool? - attr_accessor currency: String + def initialize: ( + amount: String, + currency: String, + ?write_off_overage: bool? + ) -> void - attr_accessor write_off_overage: bool? + def to_hash: -> { + amount: String, + currency: String, + write_off_overage: bool? + } + end - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void + type model_type = :unit - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end + module ModelType + extend Orb::Internal::Type::Enum + + UNIT: :unit + + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::model_type] 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 + type price = + Orb::NewPlanUnitPrice + | Orb::NewPlanTieredPrice + | Orb::NewPlanBulkPrice + | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters + | Orb::NewPlanPackagePrice + | Orb::NewPlanMatrixPrice + | Orb::NewPlanThresholdTotalAmountPrice + | Orb::NewPlanTieredPackagePrice + | Orb::NewPlanTieredWithMinimumPrice + | Orb::NewPlanGroupedTieredPrice + | Orb::NewPlanTieredPackageWithMinimumPrice + | Orb::NewPlanPackageWithAllocationPrice + | Orb::NewPlanUnitWithPercentPrice + | Orb::NewPlanMatrixWithAllocationPrice + | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts + | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration + | Orb::NewPlanUnitWithProrationPrice + | Orb::NewPlanGroupedAllocationPrice + | Orb::NewPlanBulkWithProrationPrice + | Orb::NewPlanGroupedWithProratedMinimumPrice + | Orb::NewPlanGroupedWithMeteredMinimumPrice + | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds + | Orb::NewPlanMatrixWithDisplayNamePrice + | Orb::NewPlanGroupedTieredPackagePrice + | Orb::NewPlanMaxGroupTieredPackagePrice + | Orb::NewPlanScalableMatrixWithUnitPricingPrice + | Orb::NewPlanScalableMatrixWithTieredPricingPrice + | Orb::NewPlanCumulativeGroupedBulkPrice + | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation + | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance + | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance + | Orb::NewPlanMinimumCompositePrice + | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::Percent + | Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::EventOutput - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end - end + module Price + extend Orb::Internal::Type::Union - type cumulative_grouped_allocation = + type bulk_with_filters = { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - model_type: :cumulative_grouped_allocation, + 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::CumulativeGroupedAllocation::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -12252,16 +2226,14 @@ module Orb reference_id: String? } - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence + class BulkWithFilters < Orb::Internal::Type::BaseModel + attr_accessor bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig - attr_accessor cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::cadence attr_accessor item_id: String - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation] - - attr_accessor model_type: :cumulative_grouped_allocation + attr_accessor model_type: :bulk_with_filters attr_accessor name: String @@ -12273,7 +2245,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::conversion_rate_config? attr_accessor currency: String? @@ -12294,16 +2266,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], name: String, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -12313,21 +2284,20 @@ 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::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::LicenseAllocation], - model_type: :cumulative_grouped_allocation, + 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::CumulativeGroupedAllocation::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -12339,193 +2309,63 @@ module Orb reference_id: String? } - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence] - end - - type cumulative_grouped_allocation_config = + type bulk_with_filters_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 + filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], + tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] } - end - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + attr_accessor filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter] - attr_accessor write_off_overage: bool? + attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? + filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], + tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] ) -> void def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? + filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], + tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] } - 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? + type filter = { property_key: String, property_value: String } - attr_accessor external_price_id: String? + class Filter < Orb::Internal::Type::BaseModel + attr_accessor property_key: String - attr_accessor fixed_price_quantity: Float? + attr_accessor property_value: String - attr_accessor invoice_grouping_key: String? + def initialize: ( + property_key: String, + property_value: String + ) -> void - attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + def to_hash: -> { + property_key: String, + property_value: String + } + end - attr_accessor license_type_id: String? + type tier = { unit_amount: String, tier_lower_bound: String? } - attr_accessor metadata: ::Hash[Symbol, String?]? + class Tier < Orb::Internal::Type::BaseModel + attr_accessor unit_amount: String - attr_accessor reference_id: String? + attr_accessor tier_lower_bound: 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 initialize: ( + unit_amount: String, + ?tier_lower_bound: String? + ) -> 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? - } + def to_hash: -> { + unit_amount: String, + tier_lower_bound: String? + } + end + end type cadence = :annual @@ -12545,64 +2385,22 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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 } + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::cadence] end end - type percent = + type matrix_with_threshold_discounts = { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation], - model_type: :percent, + matrix_with_threshold_discounts_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, name: String, - 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::ReplacePrice::LicenseAllocationPrice::Percent::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -12614,19 +2412,17 @@ module Orb reference_id: String? } - class Percent < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::cadence + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence attr_accessor item_id: String - attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation] + attr_accessor matrix_with_threshold_discounts_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig - attr_accessor model_type: :percent + attr_accessor model_type: :matrix_with_threshold_discounts attr_accessor name: String - attr_accessor percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig - attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -12635,7 +2431,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config? attr_accessor currency: String? @@ -12656,16 +2452,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation], + matrix_with_threshold_discounts_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, name: String, - 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::ReplacePrice::LicenseAllocationPrice::Percent::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -12675,21 +2470,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :percent + ?model_type: :matrix_with_threshold_discounts ) -> void def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation], - model_type: :percent, + matrix_with_threshold_discounts_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, name: String, - 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::ReplacePrice::LicenseAllocationPrice::Percent::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -12719,56 +2513,127 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::cadence] - end + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence] + end + + type matrix_with_threshold_discounts_config = + { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor first_dimension: String + + attr_accessor matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] + + attr_accessor second_dimension: String? + + attr_reader threshold_discount_groups: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup]? + + def threshold_discount_groups=: ( + ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + + def initialize: ( + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + ?second_dimension: String?, + ?threshold_discount_groups: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> void + + def to_hash: -> { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + type matrix_value = + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor first_dimension_value: String + + attr_accessor unit_amount: String + + attr_accessor second_dimension_value: String? - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } + def initialize: ( + first_dimension_value: String, + unit_amount: String, + ?second_dimension_value: String? + ) -> void - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + def to_hash: -> { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + end - attr_accessor currency: String + type threshold_discount_group = + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } - attr_accessor write_off_overage: bool? + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + attr_accessor above_threshold_discount_percentage: String - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void + attr_accessor below_threshold_discount_percentage: String - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end + attr_accessor cell_coordinates: String - type percent_config = { percent: Float } + attr_accessor threshold_amount: String - class PercentConfig < Orb::Internal::Type::BaseModel - attr_accessor percent: Float + attr_accessor description: String? - def initialize: (percent: Float) -> void + def initialize: ( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + ?description: String? + ) -> void - def to_hash: -> { percent: Float } + def to_hash: -> { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + end end end - type event_output = + type tiered_with_proration = { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation], - model_type: :event_output, + model_type: :tiered_with_proration, name: String, + tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -12780,19 +2645,17 @@ module Orb reference_id: String? } - class EventOutput < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence - - attr_accessor event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig + class TieredWithProration < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::cadence 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 model_type: :tiered_with_proration attr_accessor name: String + attr_accessor tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig + attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -12801,7 +2664,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config? attr_accessor currency: String? @@ -12822,16 +2685,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation], name: String, + tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -12841,21 +2703,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :event_output + ?model_type: :tiered_with_proration ) -> void def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence, - event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation], - model_type: :event_output, + model_type: :tiered_with_proration, name: String, + tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -12885,111 +2746,57 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence] + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::cadence] end - type event_output_config = + type tiered_with_proration_config = { - unit_rating_key: String, - default_unit_rate: String?, - grouping_key: String? + tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] } - class EventOutputConfig < Orb::Internal::Type::BaseModel - attr_accessor unit_rating_key: String - - attr_accessor default_unit_rate: String? - - attr_accessor grouping_key: String? + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] def initialize: ( - unit_rating_key: String, - ?default_unit_rate: String?, - ?grouping_key: String? + tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] ) -> void def to_hash: -> { - unit_rating_key: String, - default_unit_rate: String?, - grouping_key: String? + tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] } - end - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + type tier = { tier_lower_bound: String, unit_amount: String } - attr_accessor currency: String + class Tier < Orb::Internal::Type::BaseModel + attr_accessor tier_lower_bound: String - attr_accessor write_off_overage: bool? + attr_accessor unit_amount: String - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void + def initialize: ( + tier_lower_bound: String, + unit_amount: String + ) -> void - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } + def to_hash: -> { + tier_lower_bound: String, + unit_amount: String + } + end end end - def self?.variants: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::license_allocation_price] - end - - type price = - 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 - - module Price - extend Orb::Internal::Type::Union - - type bulk_with_filters = + type grouped_with_min_max_thresholds = { - bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence, + grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, - model_type: :bulk_with_filters, + 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::Price::BulkWithFilters::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -13001,14 +2808,14 @@ module Orb reference_id: String? } - class BulkWithFilters < Orb::Internal::Type::BaseModel - attr_accessor bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::cadence + attr_accessor grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig attr_accessor item_id: String - attr_accessor model_type: :bulk_with_filters + attr_accessor model_type: :grouped_with_min_max_thresholds attr_accessor name: String @@ -13020,7 +2827,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config? attr_accessor currency: String? @@ -13040,107 +2847,49 @@ module Orb attr_accessor reference_id: String? - def initialize: ( - bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - attr_accessor filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter] - - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] - - def initialize: ( - filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] - ) -> void - - def to_hash: -> { - filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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 initialize: ( + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence, + grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end + def to_hash: -> { + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence, + grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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 @@ -13160,22 +2909,54 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::cadence] + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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 tiered_with_proration = + type cumulative_grouped_allocation = { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - model_type: :tiered_with_proration, + model_type: :cumulative_grouped_allocation, name: String, - tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -13187,17 +2968,17 @@ module Orb reference_id: String? } - class TieredWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::cadence + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence + + attr_accessor cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig attr_accessor item_id: String - attr_accessor model_type: :tiered_with_proration + attr_accessor model_type: :cumulative_grouped_allocation attr_accessor name: String - attr_accessor tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig - attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -13206,7 +2987,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config? attr_accessor currency: String? @@ -13227,15 +3008,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, name: String, - tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -13245,20 +3026,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :tiered_with_proration + ?model_type: :cumulative_grouped_allocation ) -> void def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - model_type: :tiered_with_proration, + model_type: :cumulative_grouped_allocation, name: String, - tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -13288,57 +3069,54 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::cadence] + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence] end - type tiered_with_proration_config = + type cumulative_grouped_allocation_config = { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + 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: ( - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String ) -> void def to_hash: -> { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - 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 daily_credit_allowance = { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, - model_type: :grouped_with_min_max_thresholds, + model_type: :daily_credit_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -13350,14 +3128,14 @@ module Orb reference_id: String? } - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::cadence - attr_accessor grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + attr_accessor daily_credit_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig attr_accessor item_id: String - attr_accessor model_type: :grouped_with_min_max_thresholds + attr_accessor model_type: :daily_credit_allowance attr_accessor name: String @@ -13369,7 +3147,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config? attr_accessor currency: String? @@ -13390,15 +3168,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, name: String, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -13408,20 +3186,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :grouped_with_min_max_thresholds + ?model_type: :daily_credit_allowance ) -> void def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, - model_type: :grouped_with_min_max_thresholds, + model_type: :daily_credit_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -13451,54 +3229,78 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence] + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::cadence] end - type grouped_with_min_max_thresholds_config = + type daily_credit_allowance_config = { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] } - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String - attr_accessor maximum_charge: String + attr_accessor default_unit_amount: String - attr_accessor minimum_charge: String + attr_accessor dimensions: ::Array[String?] - attr_accessor per_unit_rate: String + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] def initialize: ( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] ) -> void def to_hash: -> { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end end end - type cumulative_grouped_allocation = + type metered_allowance = { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::cadence, item_id: String, - model_type: :cumulative_grouped_allocation, + metered_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -13510,14 +3312,14 @@ module Orb reference_id: String? } - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence - - attr_accessor cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::cadence attr_accessor item_id: String - attr_accessor model_type: :cumulative_grouped_allocation + attr_accessor metered_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig + + attr_accessor model_type: :metered_allowance attr_accessor name: String @@ -13529,7 +3331,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config? attr_accessor currency: String? @@ -13550,15 +3352,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::cadence, item_id: String, + metered_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, name: String, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -13568,20 +3370,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :cumulative_grouped_allocation + ?model_type: :metered_allowance ) -> void def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::cadence, item_id: String, - model_type: :cumulative_grouped_allocation, + metered_allowance_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -13611,38 +3413,52 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence] + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::cadence] end - type cumulative_grouped_allocation_config = + type metered_allowance_config = { - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor cumulative_allocation: String + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String - attr_accessor group_allocation: String + attr_accessor consumption_grouping_value: String attr_accessor grouping_key: String attr_accessor unit_amount: String + attr_reader allowance_display_name: String? + + def allowance_display_name=: (String) -> String + + attr_reader consumption_display_name: String? + + def consumption_display_name=: (String) -> String + def initialize: ( - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String ) -> void def to_hash: -> { - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } end end diff --git a/sig/orb/models/beta_create_plan_version_params.rbs b/sig/orb/models/beta_create_plan_version_params.rbs index bc5e956f..53403257 100644 --- a/sig/orb/models/beta_create_plan_version_params.rbs +++ b/sig/orb/models/beta_create_plan_version_params.rbs @@ -100,7 +100,7 @@ module Orb type add_price = { allocation_price: Orb::NewAllocationPrice?, - license_allocation_price: Orb::Models::BetaCreatePlanVersionParams::AddPrice::license_allocation_price?, + license_allocation_price: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice?, plan_phase_order: Integer?, price: Orb::Models::BetaCreatePlanVersionParams::AddPrice::price? } @@ -108,7 +108,7 @@ module Orb class AddPrice < Orb::Internal::Type::BaseModel attr_accessor allocation_price: Orb::NewAllocationPrice? - attr_accessor license_allocation_price: Orb::Models::BetaCreatePlanVersionParams::AddPrice::license_allocation_price? + attr_accessor license_allocation_price: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice? attr_accessor plan_phase_order: Integer? @@ -116,67 +116,230 @@ module Orb def initialize: ( ?allocation_price: Orb::NewAllocationPrice?, - ?license_allocation_price: Orb::Models::BetaCreatePlanVersionParams::AddPrice::license_allocation_price?, + ?license_allocation_price: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice?, ?plan_phase_order: Integer?, ?price: Orb::Models::BetaCreatePlanVersionParams::AddPrice::price? ) -> void def to_hash: -> { allocation_price: Orb::NewAllocationPrice?, - license_allocation_price: Orb::Models::BetaCreatePlanVersionParams::AddPrice::license_allocation_price?, + license_allocation_price: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice?, plan_phase_order: Integer?, price: Orb::Models::BetaCreatePlanVersionParams::AddPrice::price? } type license_allocation_price = - Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent - | Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput - - module LicenseAllocationPrice + { + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::cadence + + attr_accessor item_id: String + + attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation] + + attr_accessor model_type: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::model_type + + attr_accessor name: String + + attr_accessor unit_config: Orb::UnitConfig + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: 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::cadence, + item_id: String, + license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String? + ) -> void + + def to_hash: -> { + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + module Cadence + extend Orb::Internal::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::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 model_type = :unit + + module ModelType + extend Orb::Internal::Type::Enum + + UNIT: :unit + + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::model_type] + end + end + + type price = + Orb::NewPlanUnitPrice + | Orb::NewPlanTieredPrice + | Orb::NewPlanBulkPrice + | Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters + | Orb::NewPlanPackagePrice + | Orb::NewPlanMatrixPrice + | Orb::NewPlanThresholdTotalAmountPrice + | Orb::NewPlanTieredPackagePrice + | Orb::NewPlanTieredWithMinimumPrice + | Orb::NewPlanGroupedTieredPrice + | Orb::NewPlanTieredPackageWithMinimumPrice + | Orb::NewPlanPackageWithAllocationPrice + | Orb::NewPlanUnitWithPercentPrice + | Orb::NewPlanMatrixWithAllocationPrice + | Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts + | 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::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance + | Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance + | Orb::NewPlanMinimumCompositePrice + | Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent + | Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput + + module Price extend Orb::Internal::Type::Union - type unit = + type bulk_with_filters = { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::cadence, + bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation], - model_type: :unit, + model_type: :bulk_with_filters, name: String, - unit_config: Orb::UnitConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -188,19 +351,17 @@ module Orb reference_id: String? } - class Unit < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::cadence + class BulkWithFilters < Orb::Internal::Type::BaseModel + attr_accessor bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig + + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence attr_accessor item_id: String - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation] - - attr_accessor model_type: :unit + attr_accessor model_type: :bulk_with_filters attr_accessor name: String - attr_accessor unit_config: Orb::UnitConfig - attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -209,7 +370,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config? attr_accessor currency: String? @@ -230,16 +391,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::cadence, + bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation], name: String, - unit_config: Orb::UnitConfig, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -249,21 +409,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :unit + ?model_type: :bulk_with_filters ) -> void def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::cadence, + bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::LicenseAllocation], - model_type: :unit, + model_type: :bulk_with_filters, name: String, - unit_config: Orb::UnitConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -275,6 +434,61 @@ 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 @@ -293,46 +507,22 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::cadence] - end - - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String - - attr_accessor write_off_overage: bool? - - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void - - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence] end end - type tiered = + type matrix_with_threshold_discounts = { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation], - model_type: :tiered, + matrix_with_threshold_discounts_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, name: String, - tiered_config: Orb::TieredConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -344,19 +534,17 @@ module Orb reference_id: String? } - class Tiered < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence attr_accessor item_id: String - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation] + attr_accessor matrix_with_threshold_discounts_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig - attr_accessor model_type: :tiered + attr_accessor model_type: :matrix_with_threshold_discounts attr_accessor name: String - attr_accessor tiered_config: Orb::TieredConfig - attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -365,7 +553,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config? attr_accessor currency: String? @@ -386,16 +574,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation], + matrix_with_threshold_discounts_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, name: String, - tiered_config: Orb::TieredConfig, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -405,21 +592,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :tiered + ?model_type: :matrix_with_threshold_discounts ) -> void def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation], - model_type: :tiered, + matrix_with_threshold_discounts_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, name: String, - tiered_config: Orb::TieredConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -449,46 +635,127 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence] + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence] end - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } + type matrix_with_threshold_discounts_config = + { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor first_dimension: String + + attr_accessor matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + attr_accessor second_dimension: String? - attr_accessor currency: String + attr_reader threshold_discount_groups: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup]? - attr_accessor write_off_overage: bool? + def threshold_discount_groups=: ( + ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + ?second_dimension: String?, + ?threshold_discount_groups: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] ) -> void def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] } + + type matrix_value = + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor first_dimension_value: String + + attr_accessor unit_amount: String + + attr_accessor second_dimension_value: String? + + def initialize: ( + first_dimension_value: String, + unit_amount: String, + ?second_dimension_value: String? + ) -> void + + def to_hash: -> { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + end + + type threshold_discount_group = + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + attr_accessor above_threshold_discount_percentage: String + + attr_accessor below_threshold_discount_percentage: String + + attr_accessor cell_coordinates: String + + attr_accessor threshold_amount: String + + attr_accessor description: String? + + def initialize: ( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + ?description: String? + ) -> void + + def to_hash: -> { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + end end end - type bulk = + type tiered_with_proration = { - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation], - model_type: :bulk, + model_type: :tiered_with_proration, name: String, + tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -500,19 +767,17 @@ module Orb reference_id: String? } - class Bulk < Orb::Internal::Type::BaseModel - attr_accessor bulk_config: Orb::BulkConfig - - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::cadence + class TieredWithProration < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence attr_accessor item_id: String - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation] - - attr_accessor model_type: :bulk + attr_accessor model_type: :tiered_with_proration attr_accessor name: String + attr_accessor tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig + attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -521,7 +786,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config? attr_accessor currency: String? @@ -542,16 +807,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation], name: String, + tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -561,21 +825,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :bulk + ?model_type: :tiered_with_proration ) -> void def to_hash: -> { - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation], - model_type: :bulk, + model_type: :tiered_with_proration, name: String, + tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -605,50 +868,61 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::cadence] + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::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 + type tiered_with_proration_config = + { + tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + } - attr_accessor write_off_overage: bool? + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? + tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] ) -> void def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? + tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] } - end - end - type bulk_with_filters = - { - bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - model_type: :bulk_with_filters, - name: String, - billable_metric_id: String?, - billed_in_advance: bool?, - billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, - currency: String?, - dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, - external_price_id: String?, - fixed_price_quantity: Float?, + 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?, @@ -656,16 +930,14 @@ module Orb reference_id: String? } - class BulkWithFilters < Orb::Internal::Type::BaseModel - attr_accessor bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::cadence + attr_accessor grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig attr_accessor item_id: String - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation] - - attr_accessor model_type: :bulk_with_filters + attr_accessor model_type: :grouped_with_min_max_thresholds attr_accessor name: String @@ -677,7 +949,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config? attr_accessor currency: String? @@ -698,16 +970,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence, + grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], name: String, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -717,21 +988,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :bulk_with_filters + ?model_type: :grouped_with_min_max_thresholds ) -> void def to_hash: -> { - bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence, + grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - model_type: :bulk_with_filters, + 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::BulkWithFilters::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -743,61 +1013,6 @@ module Orb reference_id: String? } - type bulk_with_filters_config = - { - filters: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - attr_accessor filters: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter] - - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - - def initialize: ( - filters: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - ) -> void - - def to_hash: -> { - filters: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - type filter = { property_key: String, property_value: String } - - class Filter < Orb::Internal::Type::BaseModel - attr_accessor property_key: String - - attr_accessor property_value: String - - def initialize: ( - property_key: String, - property_value: String - ) -> void - - def to_hash: -> { property_key: String, property_value: String } - end - - type tier = { unit_amount: String, tier_lower_bound: String? } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String - - attr_accessor tier_lower_bound: String? - - def initialize: ( - unit_amount: String, - ?tier_lower_bound: String? - ) -> void - - def to_hash: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end - type cadence = :annual | :semi_annual @@ -816,46 +1031,54 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::cadence] + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence] end - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } + 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 - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + attr_accessor maximum_charge: String - attr_accessor currency: String + attr_accessor minimum_charge: String - attr_accessor write_off_overage: bool? + attr_accessor per_unit_rate: String def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String ) -> void def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } end end - type package = + type cumulative_grouped_allocation = { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation], - model_type: :package, + model_type: :cumulative_grouped_allocation, 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?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -867,19 +1090,17 @@ module Orb reference_id: String? } - class Package < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::cadence + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence - attr_accessor item_id: String + attr_accessor cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation] + attr_accessor item_id: String - attr_accessor model_type: :package + attr_accessor model_type: :cumulative_grouped_allocation attr_accessor name: String - attr_accessor package_config: Orb::PackageConfig - attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -888,7 +1109,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config? attr_accessor currency: String? @@ -909,16 +1130,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::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?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -928,21 +1148,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :package + ?model_type: :cumulative_grouped_allocation ) -> void def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation], - model_type: :package, + model_type: :cumulative_grouped_allocation, 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?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -972,46 +1191,54 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::cadence] + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence] end - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } + type cumulative_grouped_allocation_config = + { + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String + } + + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + attr_accessor cumulative_allocation: String - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + attr_accessor group_allocation: String - attr_accessor currency: String + attr_accessor grouping_key: String - attr_accessor write_off_overage: bool? + attr_accessor unit_amount: String def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String ) -> void def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } end end - type matrix = + type daily_credit_allowance = { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - model_type: :matrix, + model_type: :daily_credit_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1023,16 +1250,14 @@ module Orb reference_id: String? } - class Matrix < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::cadence - - attr_accessor item_id: String + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::cadence - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation] + attr_accessor daily_credit_allowance_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig - attr_accessor matrix_config: Orb::MatrixConfig + attr_accessor item_id: String - attr_accessor model_type: :matrix + attr_accessor model_type: :daily_credit_allowance attr_accessor name: String @@ -1044,7 +1269,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config? attr_accessor currency: String? @@ -1065,16 +1290,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, 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?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -1084,21 +1308,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :matrix + ?model_type: :daily_credit_allowance ) -> void def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - model_type: :matrix, + model_type: :daily_credit_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1128,46 +1351,78 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::cadence] + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::cadence] end - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } + type daily_credit_allowance_config = + { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + attr_accessor default_unit_amount: String - attr_accessor currency: String + attr_accessor dimensions: ::Array[String?] - attr_accessor write_off_overage: bool? + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] ) -> void def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end end end - type threshold_total_amount = + type metered_allowance = { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - model_type: :threshold_total_amount, + metered_allowance_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, 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?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1179,19 +1434,17 @@ module Orb reference_id: String? } - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::cadence attr_accessor item_id: String - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation] + attr_accessor metered_allowance_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig - attr_accessor model_type: :threshold_total_amount + attr_accessor model_type: :metered_allowance 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? @@ -1200,7 +1453,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::conversion_rate_config? attr_accessor currency: String? @@ -1221,16 +1474,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], + metered_allowance_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, 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?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -1240,21 +1492,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :threshold_total_amount + ?model_type: :metered_allowance ) -> void def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - model_type: :threshold_total_amount, + metered_allowance_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, 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?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1284,84 +1535,68 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::cadence] + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::cadence] end - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } + type metered_allowance_config = + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String - attr_accessor currency: String + attr_accessor consumption_grouping_value: String - attr_accessor write_off_overage: bool? + attr_accessor grouping_key: String - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void + attr_accessor unit_amount: String - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end + attr_reader allowance_display_name: String? - type threshold_total_amount_config = - { - consumption_table: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - prorate: bool? - } + def allowance_display_name=: (String) -> String - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - attr_accessor consumption_table: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable] + attr_reader consumption_display_name: String? - attr_accessor prorate: bool? + def consumption_display_name=: (String) -> String def initialize: ( - consumption_table: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - ?prorate: bool? + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String ) -> void def to_hash: -> { - consumption_table: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - prorate: bool? + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } - - 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 = + type percent = { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation], - model_type: :tiered_package, + model_type: :percent, name: String, - tiered_package_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, + 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::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1373,18 +1608,16 @@ module Orb reference_id: String? } - class TieredPackage < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::cadence + class Percent < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::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 model_type: :percent attr_accessor name: String - attr_accessor tiered_package_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig + attr_accessor percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig attr_accessor billable_metric_id: String? @@ -1394,7 +1627,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config? attr_accessor currency: String? @@ -1415,16 +1648,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation], name: String, - tiered_package_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, + 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::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -1434,21 +1666,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :tiered_package + ?model_type: :percent ) -> void def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::LicenseAllocation], - model_type: :tiered_package, + model_type: :percent, name: String, - tiered_package_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig, + 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::LicenseAllocationPrice::TieredPackage::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1478,83 +1709,32 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage::cadence] + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::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 + type percent_config = { percent: Float } - attr_accessor write_off_overage: bool? + class PercentConfig < Orb::Internal::Type::BaseModel + attr_accessor percent: Float - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void + def initialize: (percent: Float) -> void - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } + def to_hash: -> { percent: Float } end + 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 = + type event_output = { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence, + event_output_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - model_type: :tiered_with_minimum, + model_type: :event_output, 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?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1566,19 +1746,17 @@ module Orb reference_id: String? } - class TieredWithMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence + class EventOutput < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence - attr_accessor item_id: String + attr_accessor event_output_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation] + attr_accessor item_id: String - attr_accessor model_type: :tiered_with_minimum + attr_accessor model_type: :event_output 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? @@ -1587,7 +1765,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config? attr_accessor currency: String? @@ -1608,16 +1786,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence, + event_output_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::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?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -1627,21 +1804,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :tiered_with_minimum + ?model_type: :event_output ) -> void def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence, + event_output_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::LicenseAllocation], - model_type: :tiered_with_minimum, + model_type: :event_output, 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?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1671,104 +1847,357 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::cadence] + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence] end - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } + type event_output_config = + { + unit_rating_key: String, + default_unit_rate: String?, + grouping_key: String? + } - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + class EventOutputConfig < Orb::Internal::Type::BaseModel + attr_accessor unit_rating_key: String - attr_accessor currency: String + attr_accessor default_unit_rate: String? - attr_accessor write_off_overage: bool? + attr_accessor grouping_key: String? def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? + unit_rating_key: String, + ?default_unit_rate: String?, + ?grouping_key: String? ) -> void def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? + unit_rating_key: String, + default_unit_rate: String?, + grouping_key: String? } end + end - type tiered_with_minimum_config = - { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - hide_zero_amount_tiers: bool, - prorate: bool - } + def self?.variants: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::price] + end + end - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier] + type remove_adjustment = + { adjustment_id: String, plan_phase_order: Integer? } - attr_reader hide_zero_amount_tiers: bool? + class RemoveAdjustment < Orb::Internal::Type::BaseModel + attr_accessor adjustment_id: String - def hide_zero_amount_tiers=: (bool) -> bool + attr_accessor plan_phase_order: Integer? - attr_reader prorate: bool? + def initialize: ( + adjustment_id: String, + ?plan_phase_order: Integer? + ) -> void - def prorate=: (bool) -> bool + def to_hash: -> { adjustment_id: String, plan_phase_order: Integer? } + end - def initialize: ( - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - ?hide_zero_amount_tiers: bool, - ?prorate: bool - ) -> void + type remove_price = { price_id: String, plan_phase_order: Integer? } - def to_hash: -> { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum::TieredWithMinimumConfig::Tier], - hide_zero_amount_tiers: bool, - prorate: bool - } + class RemovePrice < Orb::Internal::Type::BaseModel + attr_accessor price_id: String - type tier = - { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } + attr_accessor plan_phase_order: Integer? - class Tier < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String + def initialize: (price_id: String, ?plan_phase_order: Integer?) -> void - attr_accessor tier_lower_bound: String + def to_hash: -> { price_id: String, plan_phase_order: Integer? } + end - attr_accessor unit_amount: String + type replace_adjustment = + { + adjustment: Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::adjustment, + replaces_adjustment_id: String, + plan_phase_order: Integer? + } - def initialize: ( - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - ) -> void + class ReplaceAdjustment < Orb::Internal::Type::BaseModel + attr_accessor adjustment: Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::adjustment - def to_hash: -> { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - end - end + attr_accessor replaces_adjustment_id: String + + attr_accessor plan_phase_order: Integer? + + def initialize: ( + adjustment: Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::adjustment, + replaces_adjustment_id: String, + ?plan_phase_order: Integer? + ) -> void + + def to_hash: -> { + adjustment: Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::adjustment, + replaces_adjustment_id: String, + plan_phase_order: Integer? + } + + type adjustment = + Orb::NewPercentageDiscount + | Orb::NewUsageDiscount + | Orb::NewAmountDiscount + | Orb::NewMinimum + | Orb::NewMaximum + + module Adjustment + extend Orb::Internal::Type::Union + + def self?.variants: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::adjustment] + end + end + + type replace_price = + { + replaces_price_id: String, + allocation_price: Orb::NewAllocationPrice?, + license_allocation_price: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice?, + plan_phase_order: Integer?, + price: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::price? + } + + class ReplacePrice < Orb::Internal::Type::BaseModel + attr_accessor replaces_price_id: String + + attr_accessor allocation_price: Orb::NewAllocationPrice? + + attr_accessor license_allocation_price: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice? + + attr_accessor plan_phase_order: Integer? + + attr_accessor price: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::price? + + def initialize: ( + replaces_price_id: String, + ?allocation_price: Orb::NewAllocationPrice?, + ?license_allocation_price: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice?, + ?plan_phase_order: Integer?, + ?price: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::price? + ) -> void + + def to_hash: -> { + replaces_price_id: String, + allocation_price: Orb::NewAllocationPrice?, + license_allocation_price: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice?, + plan_phase_order: Integer?, + price: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::price? + } + + type license_allocation_price = + { + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::cadence + + attr_accessor item_id: String + + attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation] + + attr_accessor model_type: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::model_type + + attr_accessor name: String + + attr_accessor unit_config: Orb::UnitConfig + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String? + ) -> void + + def to_hash: -> { + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::cadence] + end + + type license_allocation = + { amount: String, currency: String, write_off_overage: bool? } + + class LicenseAllocation < Orb::Internal::Type::BaseModel + attr_accessor amount: String + + attr_accessor currency: String + + attr_accessor write_off_overage: bool? + + def initialize: ( + amount: String, + currency: String, + ?write_off_overage: bool? + ) -> void + + def to_hash: -> { + amount: String, + currency: String, + write_off_overage: bool? + } + end + + type model_type = :unit + + module ModelType + extend Orb::Internal::Type::Enum + + UNIT: :unit + + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::model_type] end + end + + type price = + Orb::NewPlanUnitPrice + | Orb::NewPlanTieredPrice + | Orb::NewPlanBulkPrice + | Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters + | Orb::NewPlanPackagePrice + | Orb::NewPlanMatrixPrice + | Orb::NewPlanThresholdTotalAmountPrice + | Orb::NewPlanTieredPackagePrice + | Orb::NewPlanTieredWithMinimumPrice + | Orb::NewPlanGroupedTieredPrice + | Orb::NewPlanTieredPackageWithMinimumPrice + | Orb::NewPlanPackageWithAllocationPrice + | Orb::NewPlanUnitWithPercentPrice + | Orb::NewPlanMatrixWithAllocationPrice + | Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts + | Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration + | Orb::NewPlanUnitWithProrationPrice + | Orb::NewPlanGroupedAllocationPrice + | Orb::NewPlanBulkWithProrationPrice + | Orb::NewPlanGroupedWithProratedMinimumPrice + | Orb::NewPlanGroupedWithMeteredMinimumPrice + | Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds + | Orb::NewPlanMatrixWithDisplayNamePrice + | Orb::NewPlanGroupedTieredPackagePrice + | Orb::NewPlanMaxGroupTieredPackagePrice + | Orb::NewPlanScalableMatrixWithUnitPricingPrice + | Orb::NewPlanScalableMatrixWithTieredPricingPrice + | Orb::NewPlanCumulativeGroupedBulkPrice + | Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation + | Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance + | Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance + | Orb::NewPlanMinimumCompositePrice + | Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent + | Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput + + module Price + extend Orb::Internal::Type::Union - type grouped_tiered = + type bulk_with_filters = { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, + bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation], - model_type: :grouped_tiered, + model_type: :bulk_with_filters, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1780,16 +2209,14 @@ module Orb reference_id: String? } - class GroupedTiered < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::cadence + class BulkWithFilters < Orb::Internal::Type::BaseModel + attr_accessor bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig - attr_accessor grouped_tiered_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::cadence attr_accessor item_id: String - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation] - - attr_accessor model_type: :grouped_tiered + attr_accessor model_type: :bulk_with_filters attr_accessor name: String @@ -1801,7 +2228,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::conversion_rate_config? attr_accessor currency: String? @@ -1822,16 +2249,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, + bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::cadence, 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?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -1841,21 +2267,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :grouped_tiered + ?model_type: :bulk_with_filters ) -> void def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::cadence, - grouped_tiered_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig, + bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::LicenseAllocation], - model_type: :grouped_tiered, + model_type: :bulk_with_filters, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1867,104 +2292,95 @@ module Orb reference_id: String? } - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom - - module Cadence - extend Orb::Internal::Type::Enum - - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time - CUSTOM: :custom - - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::cadence] - end - - type grouped_tiered_config = + type bulk_with_filters_config = { - grouping_key: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] + filters: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], + tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] } - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + attr_accessor filters: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter] - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] + attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] def initialize: ( - grouping_key: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] + filters: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], + tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] ) -> void def to_hash: -> { - grouping_key: String, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered::GroupedTieredConfig::Tier] + filters: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], + tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] } - type tier = { tier_lower_bound: String, unit_amount: String } + type filter = { property_key: String, property_value: String } - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: 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: ( - tier_lower_bound: String, - unit_amount: String + unit_amount: String, + ?tier_lower_bound: String? ) -> void def to_hash: -> { - tier_lower_bound: String, - unit_amount: String + unit_amount: String, + tier_lower_bound: String? } end end - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } - - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String - - attr_accessor currency: String + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom - attr_accessor write_off_overage: bool? + module Cadence + extend Orb::Internal::Type::Enum - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::cadence] end end - type tiered_package_with_minimum = + type matrix_with_threshold_discounts = { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - model_type: :tiered_package_with_minimum, + matrix_with_threshold_discounts_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, 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?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1976,19 +2392,17 @@ module Orb reference_id: String? } - class TieredPackageWithMinimum < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence attr_accessor item_id: String - attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation] + attr_accessor matrix_with_threshold_discounts_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig - attr_accessor model_type: :tiered_package_with_minimum + attr_accessor model_type: :matrix_with_threshold_discounts 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? @@ -1997,7 +2411,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config? attr_accessor currency: String? @@ -2018,16 +2432,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], + matrix_with_threshold_discounts_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, 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?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -2037,21 +2450,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :tiered_package_with_minimum + ?model_type: :matrix_with_threshold_discounts ) -> void def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::LicenseAllocation], - model_type: :tiered_package_with_minimum, + matrix_with_threshold_discounts_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, 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?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -2081,95 +2493,127 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::cadence] + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence] end - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } + type matrix_with_threshold_discounts_config = + { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor first_dimension: String + + attr_accessor matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + attr_accessor second_dimension: String? - attr_accessor currency: String + attr_reader threshold_discount_groups: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup]? - attr_accessor write_off_overage: bool? + def threshold_discount_groups=: ( + ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + ?second_dimension: String?, + ?threshold_discount_groups: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] ) -> void def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] } - end - type tiered_package_with_minimum_config = - { - package_size: Float, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - } + type matrix_value = + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor package_size: Float + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor first_dimension_value: String - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] + attr_accessor unit_amount: String - def initialize: ( - package_size: Float, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - ) -> void + attr_accessor second_dimension_value: String? - def to_hash: -> { - package_size: Float, - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum::TieredPackageWithMinimumConfig::Tier] - } + def initialize: ( + first_dimension_value: String, + unit_amount: String, + ?second_dimension_value: String? + ) -> void + + def to_hash: -> { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + end - type tier = + type threshold_discount_group = { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? } - class Tier < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + attr_accessor above_threshold_discount_percentage: String - attr_accessor per_unit: String + attr_accessor below_threshold_discount_percentage: String - attr_accessor tier_lower_bound: String + attr_accessor cell_coordinates: String + + attr_accessor threshold_amount: String + + attr_accessor description: String? def initialize: ( - minimum_amount: String, - per_unit: String, - tier_lower_bound: String + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + ?description: String? ) -> void def to_hash: -> { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? } end end end - type package_with_allocation = + type tiered_with_proration = { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - model_type: :package_with_allocation, + model_type: :tiered_with_proration, name: String, - package_with_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, + tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::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::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -2181,18 +2625,16 @@ module Orb reference_id: String? } - class PackageWithAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::cadence + class TieredWithProration < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::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 model_type: :tiered_with_proration attr_accessor name: String - attr_accessor package_with_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig + attr_accessor tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig attr_accessor billable_metric_id: String? @@ -2202,7 +2644,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config? attr_accessor currency: String? @@ -2223,16 +2665,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::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, + tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::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::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -2242,21 +2683,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :package_with_allocation + ?model_type: :tiered_with_proration ) -> void def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::LicenseAllocation], - model_type: :package_with_allocation, + model_type: :tiered_with_proration, name: String, - package_with_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::PackageWithAllocationConfig, + tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::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::LicenseAllocationPrice::PackageWithAllocation::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -2286,73 +2726,57 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation::cadence] + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::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 + type tiered_with_proration_config = + { + tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + } - attr_accessor write_off_overage: bool? + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? + tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] ) -> 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 + tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] } - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor allocation: String + type tier = { tier_lower_bound: String, unit_amount: String } - attr_accessor package_amount: String + class Tier < Orb::Internal::Type::BaseModel + attr_accessor tier_lower_bound: String - attr_accessor package_size: String + attr_accessor unit_amount: String - def initialize: ( - allocation: String, - package_amount: String, - package_size: String - ) -> void + def initialize: ( + tier_lower_bound: String, + unit_amount: String + ) -> void - def to_hash: -> { - allocation: String, - package_amount: String, - package_size: String - } + def to_hash: -> { + tier_lower_bound: String, + unit_amount: String + } + end end end - type unit_with_percent = + type grouped_with_min_max_thresholds = { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence, + grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::LicenseAllocation], - model_type: :unit_with_percent, + model_type: :grouped_with_min_max_thresholds, 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?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -2364,19 +2788,17 @@ module Orb reference_id: String? } - class UnitWithPercent < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::cadence + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence + + attr_accessor grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig 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 model_type: :grouped_with_min_max_thresholds 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? @@ -2385,7 +2807,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config? attr_accessor currency: String? @@ -2405,10718 +2827,49 @@ module Orb 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::ReplacePrice::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::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::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::ReplacePrice::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::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::ReplacePrice::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::ReplacePrice::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::ReplacePrice::LicenseAllocationPrice::Percent::cadence, - item_id: String, - license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation], - name: String, - 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::ReplacePrice::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::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::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::ReplacePrice::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::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 } - - 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::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::ReplacePrice::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::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence - - 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 - - attr_accessor billable_metric_id: String? - - attr_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::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::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::ReplacePrice::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::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::ReplacePrice::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::ReplacePrice::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::ReplacePrice::license_allocation_price] - end - - type price = - 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 - - module Price - extend Orb::Internal::Type::Union - - type bulk_with_filters = - { - bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig - - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - attr_accessor filters: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter] - - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] - - def initialize: ( - filters: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] - ) -> void - - def to_hash: -> { - filters: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::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 initialize: ( + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence, + grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end + def to_hash: -> { + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence, + grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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 @@ -13136,22 +2889,54 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::cadence] + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::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 tiered_with_proration = + type cumulative_grouped_allocation = { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - model_type: :tiered_with_proration, + model_type: :cumulative_grouped_allocation, name: String, - tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -13163,17 +2948,17 @@ module Orb reference_id: String? } - class TieredWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::cadence + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence + + attr_accessor cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig attr_accessor item_id: String - attr_accessor model_type: :tiered_with_proration + attr_accessor model_type: :cumulative_grouped_allocation attr_accessor name: String - attr_accessor tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig - attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -13182,7 +2967,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config? attr_accessor currency: String? @@ -13203,15 +2988,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, name: String, - tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -13221,20 +3006,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :tiered_with_proration + ?model_type: :cumulative_grouped_allocation ) -> void def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - model_type: :tiered_with_proration, + model_type: :cumulative_grouped_allocation, name: String, - tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -13264,57 +3049,54 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::cadence] + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence] end - type tiered_with_proration_config = + type cumulative_grouped_allocation_config = { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + 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: ( - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String ) -> void def to_hash: -> { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - 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 daily_credit_allowance = { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, - model_type: :grouped_with_min_max_thresholds, + model_type: :daily_credit_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -13326,14 +3108,14 @@ module Orb reference_id: String? } - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::cadence - attr_accessor grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + attr_accessor daily_credit_allowance_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig attr_accessor item_id: String - attr_accessor model_type: :grouped_with_min_max_thresholds + attr_accessor model_type: :daily_credit_allowance attr_accessor name: String @@ -13345,7 +3127,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config? attr_accessor currency: String? @@ -13366,15 +3148,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, name: String, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -13384,20 +3166,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :grouped_with_min_max_thresholds + ?model_type: :daily_credit_allowance ) -> void def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, - model_type: :grouped_with_min_max_thresholds, + model_type: :daily_credit_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -13427,54 +3209,78 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence] + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::cadence] end - type grouped_with_min_max_thresholds_config = + type daily_credit_allowance_config = { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] } - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String - attr_accessor maximum_charge: String + attr_accessor default_unit_amount: String - attr_accessor minimum_charge: String + attr_accessor dimensions: ::Array[String?] - attr_accessor per_unit_rate: String + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] def initialize: ( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] ) -> void def to_hash: -> { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end end end - type cumulative_grouped_allocation = + type metered_allowance = { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::cadence, item_id: String, - model_type: :cumulative_grouped_allocation, + metered_allowance_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -13486,14 +3292,14 @@ module Orb reference_id: String? } - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence - - attr_accessor cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::cadence attr_accessor item_id: String - attr_accessor model_type: :cumulative_grouped_allocation + attr_accessor metered_allowance_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig + + attr_accessor model_type: :metered_allowance attr_accessor name: String @@ -13505,7 +3311,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config? attr_accessor currency: String? @@ -13526,15 +3332,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::cadence, item_id: String, + metered_allowance_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, name: String, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -13544,20 +3350,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :cumulative_grouped_allocation + ?model_type: :metered_allowance ) -> void def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::cadence, item_id: String, - model_type: :cumulative_grouped_allocation, + metered_allowance_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -13587,38 +3393,52 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence] + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::cadence] end - type cumulative_grouped_allocation_config = + type metered_allowance_config = { - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor cumulative_allocation: String + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String - attr_accessor group_allocation: String + attr_accessor consumption_grouping_value: String attr_accessor grouping_key: String attr_accessor unit_amount: String + attr_reader allowance_display_name: String? + + def allowance_display_name=: (String) -> String + + attr_reader consumption_display_name: String? + + def consumption_display_name=: (String) -> String + def initialize: ( - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String ) -> void def to_hash: -> { - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } end end diff --git a/sig/orb/models/customer.rbs b/sig/orb/models/customer.rbs index dd42ee8d..5cf50667 100644 --- a/sig/orb/models/customer.rbs +++ b/sig/orb/models/customer.rbs @@ -221,14 +221,13 @@ module Orb provider_type: Orb::Models::Customer::AccountingSyncConfiguration::AccountingProvider::provider_type } - type provider_type = :quickbooks | :netsuite | :netsuite_ampersand + type provider_type = :quickbooks | :netsuite module ProviderType extend Orb::Internal::Type::Enum QUICKBOOKS: :quickbooks NETSUITE: :netsuite - NETSUITE_AMPERSAND: :netsuite_ampersand def self?.values: -> ::Array[Orb::Models::Customer::AccountingSyncConfiguration::AccountingProvider::provider_type] end diff --git a/sig/orb/models/customer_tax_id.rbs b/sig/orb/models/customer_tax_id.rbs index 8d81dcf9..a7e098b7 100644 --- a/sig/orb/models/customer_tax_id.rbs +++ b/sig/orb/models/customer_tax_id.rbs @@ -58,9 +58,9 @@ module Orb | :CO | :CR | :CV - | :DE | :CY | :CZ + | :DE | :DK | :DO | :EC @@ -70,9 +70,11 @@ module Orb | :ET | :EU | :FI + | :FO | :FR | :GB | :GE + | :GI | :GN | :GR | :HK @@ -92,6 +94,7 @@ module Orb | :KZ | :LA | :LI + | :LK | :LT | :LU | :LV @@ -113,6 +116,7 @@ module Orb | :PH | :PL | :PT + | :PY | :RO | :RS | :RU @@ -174,9 +178,9 @@ module Orb CO: :CO CR: :CR CV: :CV - DE: :DE CY: :CY CZ: :CZ + DE: :DE DK: :DK DO: :DO EC: :EC @@ -186,9 +190,11 @@ module Orb ET: :ET EU: :EU FI: :FI + FO: :FO FR: :FR GB: :GB GE: :GE + GI: :GI GN: :GN GR: :GR HK: :HK @@ -208,6 +214,7 @@ module Orb KZ: :KZ LA: :LA LI: :LI + LK: :LK LT: :LT LU: :LU LV: :LV @@ -229,6 +236,7 @@ module Orb PH: :PH PL: :PL PT: :PT + PY: :PY RO: :RO RS: :RS RU: :RU @@ -305,8 +313,10 @@ module Orb | :es_cif | :et_tin | :eu_oss_vat + | :fo_vat | :gb_vat | :ge_vat + | :gi_tin | :gn_nif | :hk_br | :hr_oib @@ -315,6 +325,7 @@ module Orb | :il_vat | :in_gst | :is_vat + | :it_cf | :jp_cn | :jp_rn | :jp_trn @@ -326,6 +337,7 @@ module Orb | :la_tin | :li_uid | :li_vat + | :lk_vat | :ma_vat | :md_vat | :me_pib @@ -344,6 +356,7 @@ module Orb | :pe_ruc | :ph_tin | :pl_nip + | :py_ruc | :ro_tin | :rs_pib | :ru_inn @@ -420,8 +433,10 @@ module Orb ES_CIF: :es_cif ET_TIN: :et_tin EU_OSS_VAT: :eu_oss_vat + FO_VAT: :fo_vat GB_VAT: :gb_vat GE_VAT: :ge_vat + GI_TIN: :gi_tin GN_NIF: :gn_nif HK_BR: :hk_br HR_OIB: :hr_oib @@ -430,6 +445,7 @@ module Orb IL_VAT: :il_vat IN_GST: :in_gst IS_VAT: :is_vat + IT_CF: :it_cf JP_CN: :jp_cn JP_RN: :jp_rn JP_TRN: :jp_trn @@ -441,6 +457,7 @@ module Orb LA_TIN: :la_tin LI_UID: :li_uid LI_VAT: :li_vat + LK_VAT: :lk_vat MA_VAT: :ma_vat MD_VAT: :md_vat ME_PIB: :me_pib @@ -459,6 +476,7 @@ module Orb PE_RUC: :pe_ruc PH_TIN: :ph_tin PL_NIP: :pl_nip + PY_RUC: :py_ruc RO_TIN: :ro_tin RS_PIB: :rs_pib RU_INN: :ru_inn diff --git a/sig/orb/models/new_allocation_price.rbs b/sig/orb/models/new_allocation_price.rbs index f3e692dd..1c265a5a 100644 --- a/sig/orb/models/new_allocation_price.rbs +++ b/sig/orb/models/new_allocation_price.rbs @@ -10,6 +10,7 @@ module Orb filters: ::Array[Orb::NewAllocationPrice::Filter]?, item_id: String?, license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, per_unit_cost_basis: String } @@ -30,6 +31,8 @@ module Orb attr_accessor license_type_id: String? + attr_accessor metadata: ::Hash[Symbol, String?]? + attr_reader per_unit_cost_basis: String? def per_unit_cost_basis=: (String) -> String @@ -43,6 +46,7 @@ module Orb ?filters: ::Array[Orb::NewAllocationPrice::Filter]?, ?item_id: String?, ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, ?per_unit_cost_basis: String ) -> void @@ -55,6 +59,7 @@ module Orb filters: ::Array[Orb::NewAllocationPrice::Filter]?, item_id: String?, license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, per_unit_cost_basis: String } diff --git a/sig/orb/models/plan_create_params.rbs b/sig/orb/models/plan_create_params.rbs index c39d1f83..5f2d1865 100644 --- a/sig/orb/models/plan_create_params.rbs +++ b/sig/orb/models/plan_create_params.rbs @@ -7,6 +7,7 @@ module Orb prices: ::Array[Orb::PlanCreateParams::Price], adjustments: ::Array[Orb::PlanCreateParams::Adjustment]?, default_invoice_memo: String?, + description: String?, external_plan_id: String?, metadata: ::Hash[Symbol, String?]?, net_terms: Integer?, @@ -29,6 +30,8 @@ module Orb attr_accessor default_invoice_memo: String? + attr_accessor description: String? + attr_accessor external_plan_id: String? attr_accessor metadata: ::Hash[Symbol, String?]? @@ -49,6 +52,7 @@ module Orb prices: ::Array[Orb::PlanCreateParams::Price], ?adjustments: ::Array[Orb::PlanCreateParams::Adjustment]?, ?default_invoice_memo: String?, + ?description: String?, ?external_plan_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?net_terms: Integer?, @@ -63,6 +67,7 @@ module Orb prices: ::Array[Orb::PlanCreateParams::Price], adjustments: ::Array[Orb::PlanCreateParams::Adjustment]?, default_invoice_memo: String?, + description: String?, external_plan_id: String?, metadata: ::Hash[Symbol, String?]?, net_terms: Integer?, @@ -74,7 +79,7 @@ module Orb type price = { allocation_price: Orb::NewAllocationPrice?, - license_allocation_price: Orb::Models::PlanCreateParams::Price::license_allocation_price?, + license_allocation_price: Orb::PlanCreateParams::Price::LicenseAllocationPrice?, plan_phase_order: Integer?, price: Orb::Models::PlanCreateParams::Price::price? } @@ -82,7 +87,7 @@ module Orb class Price < Orb::Internal::Type::BaseModel attr_accessor allocation_price: Orb::NewAllocationPrice? - attr_accessor license_allocation_price: Orb::Models::PlanCreateParams::Price::license_allocation_price? + attr_accessor license_allocation_price: Orb::PlanCreateParams::Price::LicenseAllocationPrice? attr_accessor plan_phase_order: Integer? @@ -90,67 +95,230 @@ module Orb def initialize: ( ?allocation_price: Orb::NewAllocationPrice?, - ?license_allocation_price: Orb::Models::PlanCreateParams::Price::license_allocation_price?, + ?license_allocation_price: Orb::PlanCreateParams::Price::LicenseAllocationPrice?, ?plan_phase_order: Integer?, ?price: Orb::Models::PlanCreateParams::Price::price? ) -> void def to_hash: -> { allocation_price: Orb::NewAllocationPrice?, - license_allocation_price: Orb::Models::PlanCreateParams::Price::license_allocation_price?, + license_allocation_price: Orb::PlanCreateParams::Price::LicenseAllocationPrice?, plan_phase_order: Integer?, price: Orb::Models::PlanCreateParams::Price::price? } type license_allocation_price = - Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackage - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithMinimum - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTiered - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredPackageWithMinimum - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::PackageWithAllocation - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithPercent - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithAllocation - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::TieredWithProration - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::UnitWithProration - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedAllocation - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithProration - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithProratedMinimum - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMeteredMinimum - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedWithMinMaxThresholds - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::MatrixWithDisplayName - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::GroupedTieredPackage - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::MaxGroupTieredPackage - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithUnitPricing - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::ScalableMatrixWithTieredPricing - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedBulk - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::CumulativeGroupedAllocation - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::MinimumComposite - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::Percent - | Orb::PlanCreateParams::Price::LicenseAllocationPrice::EventOutput - - module LicenseAllocationPrice + { + cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class LicenseAllocationPrice < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::cadence + + attr_accessor item_id: String + + attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::LicenseAllocation] + + attr_accessor model_type: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::model_type + + attr_accessor name: String + + attr_accessor unit_config: Orb::UnitConfig + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String? + ) -> void + + def to_hash: -> { + cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::cadence, + item_id: String, + license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::LicenseAllocation], + model_type: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::model_type, + name: String, + unit_config: Orb::UnitConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::cadence] + end + + type license_allocation = + { amount: String, currency: String, write_off_overage: bool? } + + class LicenseAllocation < Orb::Internal::Type::BaseModel + attr_accessor amount: String + + attr_accessor currency: String + + attr_accessor write_off_overage: bool? + + def initialize: ( + amount: String, + currency: String, + ?write_off_overage: bool? + ) -> void + + def to_hash: -> { + amount: String, + currency: String, + write_off_overage: bool? + } + end + + type model_type = :unit + + module ModelType + extend Orb::Internal::Type::Enum + + UNIT: :unit + + def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::model_type] + end + end + + type price = + Orb::NewPlanUnitPrice + | Orb::NewPlanTieredPrice + | Orb::NewPlanBulkPrice + | Orb::PlanCreateParams::Price::Price::BulkWithFilters + | Orb::NewPlanPackagePrice + | Orb::NewPlanMatrixPrice + | Orb::NewPlanThresholdTotalAmountPrice + | Orb::NewPlanTieredPackagePrice + | Orb::NewPlanTieredWithMinimumPrice + | Orb::NewPlanGroupedTieredPrice + | Orb::NewPlanTieredPackageWithMinimumPrice + | Orb::NewPlanPackageWithAllocationPrice + | Orb::NewPlanUnitWithPercentPrice + | Orb::NewPlanMatrixWithAllocationPrice + | Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts + | Orb::PlanCreateParams::Price::Price::TieredWithProration + | Orb::NewPlanUnitWithProrationPrice + | Orb::NewPlanGroupedAllocationPrice + | Orb::NewPlanBulkWithProrationPrice + | Orb::NewPlanGroupedWithProratedMinimumPrice + | Orb::NewPlanGroupedWithMeteredMinimumPrice + | Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds + | Orb::NewPlanMatrixWithDisplayNamePrice + | Orb::NewPlanGroupedTieredPackagePrice + | Orb::NewPlanMaxGroupTieredPackagePrice + | Orb::NewPlanScalableMatrixWithUnitPricingPrice + | Orb::NewPlanScalableMatrixWithTieredPricingPrice + | Orb::NewPlanCumulativeGroupedBulkPrice + | Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation + | Orb::PlanCreateParams::Price::Price::DailyCreditAllowance + | Orb::PlanCreateParams::Price::Price::MeteredAllowance + | Orb::NewPlanMinimumCompositePrice + | Orb::PlanCreateParams::Price::Price::Percent + | Orb::PlanCreateParams::Price::Price::EventOutput + + module Price extend Orb::Internal::Type::Union - type unit = + type bulk_with_filters = { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Unit::cadence, + bulk_with_filters_config: Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters::cadence, item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::LicenseAllocation], - model_type: :unit, + model_type: :bulk_with_filters, 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?, + conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -162,19 +330,17 @@ module Orb reference_id: String? } - class Unit < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Unit::cadence + class BulkWithFilters < Orb::Internal::Type::BaseModel + attr_accessor bulk_with_filters_config: Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig - attr_accessor item_id: String + attr_accessor cadence: Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters::cadence - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::LicenseAllocation] + attr_accessor item_id: String - attr_accessor model_type: :unit + attr_accessor model_type: :bulk_with_filters attr_accessor name: String - attr_accessor unit_config: Orb::UnitConfig - attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -183,7 +349,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Unit::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters::conversion_rate_config? attr_accessor currency: String? @@ -204,16 +370,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Unit::cadence, + bulk_with_filters_config: Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters::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?, + ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -223,21 +388,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :unit + ?model_type: :bulk_with_filters ) -> void def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Unit::cadence, + bulk_with_filters_config: Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters::cadence, item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit::LicenseAllocation], - model_type: :unit, + model_type: :bulk_with_filters, 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?, + conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -249,6 +413,61 @@ module Orb reference_id: String? } + type bulk_with_filters_config = + { + filters: ::Array[Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], + tiers: ::Array[Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] + } + + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + attr_accessor filters: ::Array[Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig::Filter] + + attr_accessor tiers: ::Array[Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] + + def initialize: ( + filters: ::Array[Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], + tiers: ::Array[Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] + ) -> void + + def to_hash: -> { + filters: ::Array[Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], + tiers: ::Array[Orb::PlanCreateParams::Price::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 @@ -267,46 +486,22 @@ module Orb 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? - } + def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::Price::BulkWithFilters::cadence] end end - type tiered = + type matrix_with_threshold_discounts = { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::cadence, + cadence: Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::cadence, item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::LicenseAllocation], - model_type: :tiered, + matrix_with_threshold_discounts_config: Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, 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?, + conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -318,19 +513,17 @@ module Orb reference_id: String? } - class Tiered < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::cadence + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::cadence attr_accessor item_id: String - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::LicenseAllocation] + attr_accessor matrix_with_threshold_discounts_config: Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig - attr_accessor model_type: :tiered + attr_accessor model_type: :matrix_with_threshold_discounts attr_accessor name: String - attr_accessor tiered_config: Orb::TieredConfig - attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -339,7 +532,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::conversion_rate_config? attr_accessor currency: String? @@ -360,16 +553,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::cadence, + cadence: Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::cadence, item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::LicenseAllocation], + matrix_with_threshold_discounts_config: Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, 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?, + ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -379,21 +571,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :tiered + ?model_type: :matrix_with_threshold_discounts ) -> void def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::cadence, + cadence: Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::cadence, item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::LicenseAllocation], - model_type: :tiered, + matrix_with_threshold_discounts_config: Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, 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?, + conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -423,46 +614,127 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Tiered::cadence] + def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::cadence] end - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } + type matrix_with_threshold_discounts_config = + { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + attr_accessor default_unit_amount: String - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + attr_accessor first_dimension: String + + attr_accessor matrix_values: ::Array[Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] + + attr_accessor second_dimension: String? - attr_accessor currency: String + attr_reader threshold_discount_groups: ::Array[Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup]? - attr_accessor write_off_overage: bool? + def threshold_discount_groups=: ( + ::Array[Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> ::Array[Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + ?second_dimension: String?, + ?threshold_discount_groups: ::Array[Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] ) -> void def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] } + + type matrix_value = + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor first_dimension_value: String + + attr_accessor unit_amount: String + + attr_accessor second_dimension_value: String? + + def initialize: ( + first_dimension_value: String, + unit_amount: String, + ?second_dimension_value: String? + ) -> void + + def to_hash: -> { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + end + + type threshold_discount_group = + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + attr_accessor above_threshold_discount_percentage: String + + attr_accessor below_threshold_discount_percentage: String + + attr_accessor cell_coordinates: String + + attr_accessor threshold_amount: String + + attr_accessor description: String? + + def initialize: ( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + ?description: String? + ) -> void + + def to_hash: -> { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + end end end - type bulk = + type tiered_with_proration = { - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::cadence, + cadence: Orb::Models::PlanCreateParams::Price::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::LicenseAllocation], - model_type: :bulk, + model_type: :tiered_with_proration, name: String, + tiered_with_proration_config: Orb::PlanCreateParams::Price::Price::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::Bulk::conversion_rate_config?, + conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::TieredWithProration::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -474,19 +746,17 @@ module Orb 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 + class TieredWithProration < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PlanCreateParams::Price::Price::TieredWithProration::cadence attr_accessor item_id: String - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::LicenseAllocation] - - attr_accessor model_type: :bulk + attr_accessor model_type: :tiered_with_proration attr_accessor name: String + attr_accessor tiered_with_proration_config: Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig + attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -495,7 +765,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::TieredWithProration::conversion_rate_config? attr_accessor currency: String? @@ -516,16 +786,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::cadence, + cadence: Orb::Models::PlanCreateParams::Price::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::LicenseAllocation], name: String, + tiered_with_proration_config: Orb::PlanCreateParams::Price::Price::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::Bulk::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::TieredWithProration::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -535,21 +804,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :bulk + ?model_type: :tiered_with_proration ) -> void def to_hash: -> { - bulk_config: Orb::BulkConfig, - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::cadence, + cadence: Orb::Models::PlanCreateParams::Price::Price::TieredWithProration::cadence, item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::LicenseAllocation], - model_type: :bulk, + model_type: :tiered_with_proration, name: String, + tiered_with_proration_config: Orb::PlanCreateParams::Price::Price::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::Bulk::conversion_rate_config?, + conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::TieredWithProration::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -579,46 +847,57 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Bulk::cadence] + def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::Price::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 + type tiered_with_proration_config = + { + tiers: ::Array[Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier] + } - attr_accessor write_off_overage: bool? + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + attr_accessor tiers: ::Array[Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier] def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? + tiers: ::Array[Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier] ) -> void def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? + tiers: ::Array[Orb::PlanCreateParams::Price::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 bulk_with_filters = + type grouped_with_min_max_thresholds = { - bulk_with_filters_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::cadence, + cadence: Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::cadence, + grouped_with_min_max_thresholds_config: Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - model_type: :bulk_with_filters, + 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::BulkWithFilters::conversion_rate_config?, + conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -630,16 +909,14 @@ module Orb reference_id: String? } - class BulkWithFilters < Orb::Internal::Type::BaseModel - attr_accessor bulk_with_filters_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::cadence - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::cadence + attr_accessor grouped_with_min_max_thresholds_config: Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig 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 model_type: :grouped_with_min_max_thresholds attr_accessor name: String @@ -651,7 +928,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::conversion_rate_config? attr_accessor currency: String? @@ -672,16 +949,15 @@ module Orb 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, + cadence: Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::cadence, + grouped_with_min_max_thresholds_config: Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, 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?, + ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -691,21 +967,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :bulk_with_filters + ?model_type: :grouped_with_min_max_thresholds ) -> void def to_hash: -> { - bulk_with_filters_config: Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::cadence, + cadence: Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::cadence, + grouped_with_min_max_thresholds_config: Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation], - model_type: :bulk_with_filters, + 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::BulkWithFilters::conversion_rate_config?, + conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -717,61 +992,6 @@ module Orb 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 @@ -790,46 +1010,54 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::BulkWithFilters::cadence] + def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::cadence] end - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } + 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 - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + attr_accessor maximum_charge: String - attr_accessor currency: String + attr_accessor minimum_charge: String - attr_accessor write_off_overage: bool? + attr_accessor per_unit_rate: String def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String ) -> void def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } end end - type package = + type cumulative_grouped_allocation = { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package::cadence, + cadence: Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::LicenseAllocation], - model_type: :package, + model_type: :cumulative_grouped_allocation, 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?, + conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -841,19 +1069,17 @@ module Orb reference_id: String? } - class Package < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package::cadence + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::cadence + + attr_accessor cumulative_grouped_allocation_config: Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig attr_accessor item_id: String - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::LicenseAllocation] - - attr_accessor model_type: :package + attr_accessor model_type: :cumulative_grouped_allocation attr_accessor name: String - attr_accessor package_config: Orb::PackageConfig - attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -862,7 +1088,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::conversion_rate_config? attr_accessor currency: String? @@ -883,16 +1109,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package::cadence, + cadence: Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, 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?, + ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -902,21 +1127,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :package + ?model_type: :cumulative_grouped_allocation ) -> void def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package::cadence, + cadence: Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Package::LicenseAllocation], - model_type: :package, + model_type: :cumulative_grouped_allocation, 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?, + conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -946,46 +1170,54 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Package::cadence] + def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::cadence] end - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } + type cumulative_grouped_allocation_config = + { + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String + } + + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + attr_accessor cumulative_allocation: String - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + attr_accessor group_allocation: String - attr_accessor currency: String + attr_accessor grouping_key: String - attr_accessor write_off_overage: bool? + attr_accessor unit_amount: String def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String ) -> void def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } end end - type matrix = + type daily_credit_allowance = { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::cadence, + cadence: Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - model_type: :matrix, + model_type: :daily_credit_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::conversion_rate_config?, + conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -997,16 +1229,14 @@ module Orb reference_id: String? } - class Matrix < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::cadence - - attr_accessor item_id: String + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::cadence - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::LicenseAllocation] + attr_accessor daily_credit_allowance_config: Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig - attr_accessor matrix_config: Orb::MatrixConfig + attr_accessor item_id: String - attr_accessor model_type: :matrix + attr_accessor model_type: :daily_credit_allowance attr_accessor name: String @@ -1018,7 +1248,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::conversion_rate_config? attr_accessor currency: String? @@ -1039,16 +1269,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::cadence, + cadence: Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, 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?, + ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -1058,21 +1287,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :matrix + ?model_type: :daily_credit_allowance ) -> void def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::cadence, + cadence: Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::LicenseAllocation], - matrix_config: Orb::MatrixConfig, - model_type: :matrix, + model_type: :daily_credit_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::conversion_rate_config?, + conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1102,46 +1330,78 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::Matrix::cadence] + def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::Price::DailyCreditAllowance::cadence] end - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } + type daily_credit_allowance_config = + { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String + + attr_accessor default_unit_amount: String - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + attr_accessor dimensions: ::Array[String?] - attr_accessor currency: String + attr_accessor event_day_property: String - attr_accessor write_off_overage: bool? + attr_accessor matrix_values: ::Array[Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] ) -> void def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end end end - type threshold_total_amount = + type metered_allowance = { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::cadence, + cadence: Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::cadence, item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - model_type: :threshold_total_amount, + metered_allowance_config: Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, 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?, + conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1153,19 +1413,17 @@ module Orb reference_id: String? } - class ThresholdTotalAmount < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::cadence + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::cadence attr_accessor item_id: String - attr_accessor license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation] + attr_accessor metered_allowance_config: Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig - attr_accessor model_type: :threshold_total_amount + attr_accessor model_type: :metered_allowance 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? @@ -1174,7 +1432,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::conversion_rate_config? attr_accessor currency: String? @@ -1195,16 +1453,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::cadence, + cadence: Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::cadence, item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], + metered_allowance_config: Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig, 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?, + ?conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -1214,21 +1471,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :threshold_total_amount + ?model_type: :metered_allowance ) -> void def to_hash: -> { - cadence: Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::cadence, + cadence: Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::cadence, item_id: String, - license_allocations: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation], - model_type: :threshold_total_amount, + metered_allowance_config: Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, 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?, + conversion_rate_config: Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1258,5393 +1514,52 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::cadence] + def self?.values: -> ::Array[Orb::Models::PlanCreateParams::Price::Price::MeteredAllowance::cadence] end - type license_allocation = - { amount: String, currency: String, write_off_overage: bool? } + type metered_allowance_config = + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } - class LicenseAllocation < Orb::Internal::Type::BaseModel - attr_accessor amount: String + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String - attr_accessor currency: String + attr_accessor consumption_grouping_value: String - attr_accessor write_off_overage: bool? + attr_accessor grouping_key: String - def initialize: ( - amount: String, - currency: String, - ?write_off_overage: bool? - ) -> void + attr_accessor unit_amount: String - def to_hash: -> { - amount: String, - currency: String, - write_off_overage: bool? - } - end + attr_reader allowance_display_name: String? - type threshold_total_amount_config = - { - consumption_table: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - prorate: bool? - } + def allowance_display_name=: (String) -> String - class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - attr_accessor consumption_table: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable] + attr_reader consumption_display_name: String? - attr_accessor prorate: bool? + def consumption_display_name=: (String) -> String def initialize: ( - consumption_table: ::Array[Orb::PlanCreateParams::Price::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::ConsumptionTable], - ?prorate: bool? + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String ) -> void def to_hash: -> { - 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 - | Orb::NewPlanBulkPrice - | Orb::PlanCreateParams::Price::Price::BulkWithFilters - | Orb::NewPlanPackagePrice - | Orb::NewPlanMatrixPrice - | Orb::NewPlanThresholdTotalAmountPrice - | Orb::NewPlanTieredPackagePrice - | Orb::NewPlanTieredWithMinimumPrice - | Orb::NewPlanGroupedTieredPrice - | Orb::NewPlanTieredPackageWithMinimumPrice - | Orb::NewPlanPackageWithAllocationPrice - | Orb::NewPlanUnitWithPercentPrice - | Orb::NewPlanMatrixWithAllocationPrice - | Orb::PlanCreateParams::Price::Price::TieredWithProration - | Orb::NewPlanUnitWithProrationPrice - | Orb::NewPlanGroupedAllocationPrice - | Orb::NewPlanBulkWithProrationPrice - | Orb::NewPlanGroupedWithProratedMinimumPrice - | Orb::NewPlanGroupedWithMeteredMinimumPrice - | Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds - | Orb::NewPlanMatrixWithDisplayNamePrice - | Orb::NewPlanGroupedTieredPackagePrice - | Orb::NewPlanMaxGroupTieredPackagePrice - | Orb::NewPlanScalableMatrixWithUnitPricingPrice - | Orb::NewPlanScalableMatrixWithTieredPricingPrice - | Orb::NewPlanCumulativeGroupedBulkPrice - | Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation - | Orb::NewPlanMinimumCompositePrice - | Orb::PlanCreateParams::Price::Price::Percent - | Orb::PlanCreateParams::Price::Price::EventOutput - - module Price - extend Orb::Internal::Type::Union - - type bulk_with_filters = - { - bulk_with_filters_config: Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig - - attr_accessor cadence: Orb::Models::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] - } - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - attr_accessor filters: ::Array[Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig::Filter] - - attr_accessor tiers: ::Array[Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] - - def initialize: ( - filters: ::Array[Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] - ) -> void - - def to_hash: -> { - filters: ::Array[Orb::PlanCreateParams::Price::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::BulkWithFilters::cadence] - end - end - - type tiered_with_proration = - { - cadence: Orb::Models::PlanCreateParams::Price::Price::TieredWithProration::cadence, - item_id: String, - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::PlanCreateParams::Price::Price::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::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::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::TieredWithProration::cadence, - item_id: String, - name: String, - tiered_with_proration_config: Orb::PlanCreateParams::Price::Price::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::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::PlanCreateParams::Price::Price::TieredWithProration::cadence, - item_id: String, - model_type: :tiered_with_proration, - name: String, - tiered_with_proration_config: Orb::PlanCreateParams::Price::Price::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::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::PlanCreateParams::Price::Price::TieredWithProration::cadence] - end - - type tiered_with_proration_config = - { - tiers: ::Array[Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier] - } - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier] - - def initialize: ( - tiers: ::Array[Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier] - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::cadence - - attr_accessor grouped_with_min_max_thresholds_config: Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::cadence - - attr_accessor cumulative_grouped_allocation_config: Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::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, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String - ) -> void - - def to_hash: -> { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } end end diff --git a/sig/orb/models/plan_update_params.rbs b/sig/orb/models/plan_update_params.rbs index 317305a9..30da81a6 100644 --- a/sig/orb/models/plan_update_params.rbs +++ b/sig/orb/models/plan_update_params.rbs @@ -3,6 +3,7 @@ module Orb type plan_update_params = { plan_id: String, + description: String?, external_plan_id: String?, metadata: ::Hash[Symbol, String?]? } @@ -14,12 +15,15 @@ module Orb attr_accessor plan_id: String + attr_accessor description: String? + attr_accessor external_plan_id: String? attr_accessor metadata: ::Hash[Symbol, String?]? def initialize: ( plan_id: String, + ?description: String?, ?external_plan_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?request_options: Orb::request_opts @@ -27,6 +31,7 @@ module Orb def to_hash: -> { plan_id: String, + description: String?, external_plan_id: String?, metadata: ::Hash[Symbol, String?]?, request_options: Orb::RequestOptions diff --git a/sig/orb/models/plans/external_plan_id_update_params.rbs b/sig/orb/models/plans/external_plan_id_update_params.rbs index dda4557a..f825ede8 100644 --- a/sig/orb/models/plans/external_plan_id_update_params.rbs +++ b/sig/orb/models/plans/external_plan_id_update_params.rbs @@ -4,6 +4,7 @@ module Orb type external_plan_id_update_params = { other_external_plan_id: String, + description: String?, external_plan_id: String?, metadata: ::Hash[Symbol, String?]? } @@ -15,12 +16,15 @@ module Orb attr_accessor other_external_plan_id: String + attr_accessor description: String? + attr_accessor external_plan_id: String? attr_accessor metadata: ::Hash[Symbol, String?]? def initialize: ( other_external_plan_id: String, + ?description: String?, ?external_plan_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?request_options: Orb::request_opts @@ -28,6 +32,7 @@ module Orb def to_hash: -> { other_external_plan_id: String, + description: String?, external_plan_id: String?, metadata: ::Hash[Symbol, String?]?, request_options: Orb::RequestOptions diff --git a/sig/orb/models/price.rbs b/sig/orb/models/price.rbs index d9d26087..41a1bab6 100644 --- a/sig/orb/models/price.rbs +++ b/sig/orb/models/price.rbs @@ -15,6 +15,7 @@ module Orb | Orb::Price::PackageWithAllocation | Orb::Price::UnitWithPercent | Orb::Price::MatrixWithAllocation + | Orb::Price::MatrixWithThresholdDiscounts | Orb::Price::TieredWithProration | Orb::Price::UnitWithProration | Orb::Price::GroupedAllocation @@ -29,6 +30,8 @@ module Orb | Orb::Price::ScalableMatrixWithTieredPricing | Orb::Price::CumulativeGroupedBulk | Orb::Price::CumulativeGroupedAllocation + | Orb::Price::DailyCreditAllowance + | Orb::Price::MeteredAllowance | Orb::Price::MinimumComposite | Orb::Price::Percent | Orb::Price::EventOutput @@ -4143,16 +4146,16 @@ module Orb end end - type tiered_with_proration = + type matrix_with_threshold_discounts = { id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::TieredWithProration::billing_mode, - cadence: Orb::Models::Price::TieredWithProration::cadence, - composite_price_filters: ::Array[Orb::Price::TieredWithProration::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::MatrixWithThresholdDiscounts::billing_mode, + cadence: Orb::Models::Price::MatrixWithThresholdDiscounts::cadence, + composite_price_filters: ::Array[Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::TieredWithProration::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, @@ -4162,37 +4165,37 @@ module Orb invoice_grouping_key: String?, invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, item: Orb::ItemSlim, + matrix_with_threshold_discounts_config: Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, maximum: Orb::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], minimum: Orb::Minimum?, minimum_amount: String?, - model_type: :tiered_with_proration, + model_type: :matrix_with_threshold_discounts, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::TieredWithProration::price_type, + price_type: Orb::Models::Price::MatrixWithThresholdDiscounts::price_type, replaces_price_id: String?, - tiered_with_proration_config: Orb::Price::TieredWithProration::TieredWithProrationConfig, dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - license_type: Orb::Price::TieredWithProration::LicenseType? + license_type: Orb::Price::MatrixWithThresholdDiscounts::LicenseType? } - class TieredWithProration < Orb::Internal::Type::BaseModel + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel attr_accessor id: String attr_accessor billable_metric: Orb::BillableMetricTiny? attr_accessor billing_cycle_configuration: Orb::BillingCycleConfiguration - attr_accessor billing_mode: Orb::Models::Price::TieredWithProration::billing_mode + attr_accessor billing_mode: Orb::Models::Price::MatrixWithThresholdDiscounts::billing_mode - attr_accessor cadence: Orb::Models::Price::TieredWithProration::cadence + attr_accessor cadence: Orb::Models::Price::MatrixWithThresholdDiscounts::cadence - attr_accessor composite_price_filters: ::Array[Orb::Price::TieredWithProration::CompositePriceFilter]? + attr_accessor composite_price_filters: ::Array[Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter]? attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Price::TieredWithProration::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Price::MatrixWithThresholdDiscounts::conversion_rate_config? attr_accessor created_at: Time @@ -4212,6 +4215,8 @@ module Orb attr_accessor item: Orb::ItemSlim + attr_accessor matrix_with_threshold_discounts_config: Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + attr_accessor maximum: Orb::Maximum? attr_accessor maximum_amount: String? @@ -4222,31 +4227,29 @@ module Orb attr_accessor minimum_amount: String? - attr_accessor model_type: :tiered_with_proration + attr_accessor model_type: :matrix_with_threshold_discounts attr_accessor name: String attr_accessor plan_phase_order: Integer? - attr_accessor price_type: Orb::Models::Price::TieredWithProration::price_type + attr_accessor price_type: Orb::Models::Price::MatrixWithThresholdDiscounts::price_type attr_accessor replaces_price_id: String? - attr_accessor tiered_with_proration_config: Orb::Price::TieredWithProration::TieredWithProrationConfig - attr_accessor dimensional_price_configuration: Orb::DimensionalPriceConfiguration? - attr_accessor license_type: Orb::Price::TieredWithProration::LicenseType? + attr_accessor license_type: Orb::Price::MatrixWithThresholdDiscounts::LicenseType? def initialize: ( id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::TieredWithProration::billing_mode, - cadence: Orb::Models::Price::TieredWithProration::cadence, - composite_price_filters: ::Array[Orb::Price::TieredWithProration::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::MatrixWithThresholdDiscounts::billing_mode, + cadence: Orb::Models::Price::MatrixWithThresholdDiscounts::cadence, + composite_price_filters: ::Array[Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::TieredWithProration::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, @@ -4256,6 +4259,7 @@ module Orb invoice_grouping_key: String?, invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, item: Orb::ItemSlim, + matrix_with_threshold_discounts_config: Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, maximum: Orb::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], @@ -4263,23 +4267,22 @@ module Orb minimum_amount: String?, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::TieredWithProration::price_type, + price_type: Orb::Models::Price::MatrixWithThresholdDiscounts::price_type, replaces_price_id: String?, - tiered_with_proration_config: Orb::Price::TieredWithProration::TieredWithProrationConfig, ?dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - ?license_type: Orb::Price::TieredWithProration::LicenseType?, - ?model_type: :tiered_with_proration + ?license_type: Orb::Price::MatrixWithThresholdDiscounts::LicenseType?, + ?model_type: :matrix_with_threshold_discounts ) -> void def to_hash: -> { id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::TieredWithProration::billing_mode, - cadence: Orb::Models::Price::TieredWithProration::cadence, - composite_price_filters: ::Array[Orb::Price::TieredWithProration::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::MatrixWithThresholdDiscounts::billing_mode, + cadence: Orb::Models::Price::MatrixWithThresholdDiscounts::cadence, + composite_price_filters: ::Array[Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::TieredWithProration::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, @@ -4289,19 +4292,19 @@ module Orb invoice_grouping_key: String?, invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, item: Orb::ItemSlim, + matrix_with_threshold_discounts_config: Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, maximum: Orb::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], minimum: Orb::Minimum?, minimum_amount: String?, - model_type: :tiered_with_proration, + model_type: :matrix_with_threshold_discounts, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::TieredWithProration::price_type, + price_type: Orb::Models::Price::MatrixWithThresholdDiscounts::price_type, replaces_price_id: String?, - tiered_with_proration_config: Orb::Price::TieredWithProration::TieredWithProrationConfig, dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - license_type: Orb::Price::TieredWithProration::LicenseType? + license_type: Orb::Price::MatrixWithThresholdDiscounts::LicenseType? } type billing_mode = :in_advance | :in_arrear @@ -4312,7 +4315,7 @@ module Orb IN_ADVANCE: :in_advance IN_ARREAR: :in_arrear - def self?.values: -> ::Array[Orb::Models::Price::TieredWithProration::billing_mode] + def self?.values: -> ::Array[Orb::Models::Price::MatrixWithThresholdDiscounts::billing_mode] end type cadence = @@ -4328,32 +4331,32 @@ module Orb ANNUAL: :annual CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Price::TieredWithProration::cadence] + def self?.values: -> ::Array[Orb::Models::Price::MatrixWithThresholdDiscounts::cadence] end type composite_price_filter = { - field: Orb::Models::Price::TieredWithProration::CompositePriceFilter::field, - operator: Orb::Models::Price::TieredWithProration::CompositePriceFilter::operator, + field: Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::field, + operator: Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::operator, values: ::Array[String] } class CompositePriceFilter < Orb::Internal::Type::BaseModel - attr_accessor field: Orb::Models::Price::TieredWithProration::CompositePriceFilter::field + attr_accessor field: Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::field - attr_accessor operator: Orb::Models::Price::TieredWithProration::CompositePriceFilter::operator + attr_accessor operator: Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::operator attr_accessor values: ::Array[String] def initialize: ( - field: Orb::Models::Price::TieredWithProration::CompositePriceFilter::field, - operator: Orb::Models::Price::TieredWithProration::CompositePriceFilter::operator, + field: Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::field, + operator: Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::operator, values: ::Array[String] ) -> void def to_hash: -> { - field: Orb::Models::Price::TieredWithProration::CompositePriceFilter::field, - operator: Orb::Models::Price::TieredWithProration::CompositePriceFilter::operator, + field: Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::field, + operator: Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::operator, values: ::Array[String] } @@ -4369,7 +4372,7 @@ module Orb CURRENCY: :currency PRICING_UNIT_ID: :pricing_unit_id - def self?.values: -> ::Array[Orb::Models::Price::TieredWithProration::CompositePriceFilter::field] + def self?.values: -> ::Array[Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::field] end type operator = :includes | :excludes @@ -4380,54 +4383,127 @@ module Orb INCLUDES: :includes EXCLUDES: :excludes - def self?.values: -> ::Array[Orb::Models::Price::TieredWithProration::CompositePriceFilter::operator] + def self?.values: -> ::Array[Orb::Models::Price::MatrixWithThresholdDiscounts::CompositePriceFilter::operator] end end - type price_type = :usage_price | :fixed_price | :composite_price + type matrix_with_threshold_discounts_config = + { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } - module PriceType - extend Orb::Internal::Type::Enum + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + attr_accessor default_unit_amount: String - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - COMPOSITE_PRICE: :composite_price + attr_accessor first_dimension: String - def self?.values: -> ::Array[Orb::Models::Price::TieredWithProration::price_type] - end + attr_accessor matrix_values: ::Array[Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] - type tiered_with_proration_config = - { - tiers: ::Array[Orb::Price::TieredWithProration::TieredWithProrationConfig::Tier] - } + attr_accessor second_dimension: String? - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::Price::TieredWithProration::TieredWithProrationConfig::Tier] + attr_reader threshold_discount_groups: ::Array[Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup]? + + def threshold_discount_groups=: ( + ::Array[Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> ::Array[Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] def initialize: ( - tiers: ::Array[Orb::Price::TieredWithProration::TieredWithProrationConfig::Tier] + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + ?second_dimension: String?, + ?threshold_discount_groups: ::Array[Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] ) -> void def to_hash: -> { - tiers: ::Array[Orb::Price::TieredWithProration::TieredWithProrationConfig::Tier] + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] } - type tier = { tier_lower_bound: String, unit_amount: String } + type matrix_value = + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor first_dimension_value: String attr_accessor unit_amount: String + attr_accessor second_dimension_value: String? + def initialize: ( - tier_lower_bound: String, - unit_amount: String + first_dimension_value: String, + unit_amount: String, + ?second_dimension_value: String? ) -> void - def to_hash: -> { tier_lower_bound: String, unit_amount: String } + def to_hash: -> { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + end + + type threshold_discount_group = + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + attr_accessor above_threshold_discount_percentage: String + + attr_accessor below_threshold_discount_percentage: String + + attr_accessor cell_coordinates: String + + attr_accessor threshold_amount: String + + attr_accessor description: String? + + def initialize: ( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + ?description: String? + ) -> void + + def to_hash: -> { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } end end + type price_type = :usage_price | :fixed_price | :composite_price + + module PriceType + extend Orb::Internal::Type::Enum + + USAGE_PRICE: :usage_price + FIXED_PRICE: :fixed_price + COMPOSITE_PRICE: :composite_price + + def self?.values: -> ::Array[Orb::Models::Price::MatrixWithThresholdDiscounts::price_type] + end + type license_type = { id: String, grouping_key: String, name: String } class LicenseType < Orb::Internal::Type::BaseModel @@ -4447,16 +4523,16 @@ module Orb end end - type unit_with_proration = + type tiered_with_proration = { id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::UnitWithProration::billing_mode, - cadence: Orb::Models::Price::UnitWithProration::cadence, - composite_price_filters: ::Array[Orb::Price::UnitWithProration::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::TieredWithProration::billing_mode, + cadence: Orb::Models::Price::TieredWithProration::cadence, + composite_price_filters: ::Array[Orb::Price::TieredWithProration::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::UnitWithProration::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::TieredWithProration::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, @@ -4471,32 +4547,32 @@ module Orb metadata: ::Hash[Symbol, String], minimum: Orb::Minimum?, minimum_amount: String?, - model_type: :unit_with_proration, + model_type: :tiered_with_proration, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::UnitWithProration::price_type, + price_type: Orb::Models::Price::TieredWithProration::price_type, replaces_price_id: String?, - unit_with_proration_config: Orb::Price::UnitWithProration::UnitWithProrationConfig, + tiered_with_proration_config: Orb::Price::TieredWithProration::TieredWithProrationConfig, dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - license_type: Orb::Price::UnitWithProration::LicenseType? + license_type: Orb::Price::TieredWithProration::LicenseType? } - class UnitWithProration < Orb::Internal::Type::BaseModel + class TieredWithProration < Orb::Internal::Type::BaseModel attr_accessor id: String attr_accessor billable_metric: Orb::BillableMetricTiny? attr_accessor billing_cycle_configuration: Orb::BillingCycleConfiguration - attr_accessor billing_mode: Orb::Models::Price::UnitWithProration::billing_mode + attr_accessor billing_mode: Orb::Models::Price::TieredWithProration::billing_mode - attr_accessor cadence: Orb::Models::Price::UnitWithProration::cadence + attr_accessor cadence: Orb::Models::Price::TieredWithProration::cadence - attr_accessor composite_price_filters: ::Array[Orb::Price::UnitWithProration::CompositePriceFilter]? + attr_accessor composite_price_filters: ::Array[Orb::Price::TieredWithProration::CompositePriceFilter]? attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Price::UnitWithProration::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Price::TieredWithProration::conversion_rate_config? attr_accessor created_at: Time @@ -4526,31 +4602,31 @@ module Orb attr_accessor minimum_amount: String? - attr_accessor model_type: :unit_with_proration + attr_accessor model_type: :tiered_with_proration attr_accessor name: String attr_accessor plan_phase_order: Integer? - attr_accessor price_type: Orb::Models::Price::UnitWithProration::price_type + attr_accessor price_type: Orb::Models::Price::TieredWithProration::price_type attr_accessor replaces_price_id: String? - attr_accessor unit_with_proration_config: Orb::Price::UnitWithProration::UnitWithProrationConfig + attr_accessor tiered_with_proration_config: Orb::Price::TieredWithProration::TieredWithProrationConfig attr_accessor dimensional_price_configuration: Orb::DimensionalPriceConfiguration? - attr_accessor license_type: Orb::Price::UnitWithProration::LicenseType? + attr_accessor license_type: Orb::Price::TieredWithProration::LicenseType? def initialize: ( id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::UnitWithProration::billing_mode, - cadence: Orb::Models::Price::UnitWithProration::cadence, - composite_price_filters: ::Array[Orb::Price::UnitWithProration::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::TieredWithProration::billing_mode, + cadence: Orb::Models::Price::TieredWithProration::cadence, + composite_price_filters: ::Array[Orb::Price::TieredWithProration::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::UnitWithProration::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::TieredWithProration::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, @@ -4567,23 +4643,23 @@ module Orb minimum_amount: String?, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::UnitWithProration::price_type, + price_type: Orb::Models::Price::TieredWithProration::price_type, replaces_price_id: String?, - unit_with_proration_config: Orb::Price::UnitWithProration::UnitWithProrationConfig, + tiered_with_proration_config: Orb::Price::TieredWithProration::TieredWithProrationConfig, ?dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - ?license_type: Orb::Price::UnitWithProration::LicenseType?, - ?model_type: :unit_with_proration + ?license_type: Orb::Price::TieredWithProration::LicenseType?, + ?model_type: :tiered_with_proration ) -> void def to_hash: -> { id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::UnitWithProration::billing_mode, - cadence: Orb::Models::Price::UnitWithProration::cadence, - composite_price_filters: ::Array[Orb::Price::UnitWithProration::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::TieredWithProration::billing_mode, + cadence: Orb::Models::Price::TieredWithProration::cadence, + composite_price_filters: ::Array[Orb::Price::TieredWithProration::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::UnitWithProration::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::TieredWithProration::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, @@ -4598,14 +4674,14 @@ module Orb metadata: ::Hash[Symbol, String], minimum: Orb::Minimum?, minimum_amount: String?, - model_type: :unit_with_proration, + model_type: :tiered_with_proration, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::UnitWithProration::price_type, + price_type: Orb::Models::Price::TieredWithProration::price_type, replaces_price_id: String?, - unit_with_proration_config: Orb::Price::UnitWithProration::UnitWithProrationConfig, + tiered_with_proration_config: Orb::Price::TieredWithProration::TieredWithProrationConfig, dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - license_type: Orb::Price::UnitWithProration::LicenseType? + license_type: Orb::Price::TieredWithProration::LicenseType? } type billing_mode = :in_advance | :in_arrear @@ -4616,7 +4692,7 @@ module Orb IN_ADVANCE: :in_advance IN_ARREAR: :in_arrear - def self?.values: -> ::Array[Orb::Models::Price::UnitWithProration::billing_mode] + def self?.values: -> ::Array[Orb::Models::Price::TieredWithProration::billing_mode] end type cadence = @@ -4632,32 +4708,32 @@ module Orb ANNUAL: :annual CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Price::UnitWithProration::cadence] + def self?.values: -> ::Array[Orb::Models::Price::TieredWithProration::cadence] end type composite_price_filter = { - field: Orb::Models::Price::UnitWithProration::CompositePriceFilter::field, - operator: Orb::Models::Price::UnitWithProration::CompositePriceFilter::operator, + field: Orb::Models::Price::TieredWithProration::CompositePriceFilter::field, + operator: Orb::Models::Price::TieredWithProration::CompositePriceFilter::operator, values: ::Array[String] } class CompositePriceFilter < Orb::Internal::Type::BaseModel - attr_accessor field: Orb::Models::Price::UnitWithProration::CompositePriceFilter::field + attr_accessor field: Orb::Models::Price::TieredWithProration::CompositePriceFilter::field - attr_accessor operator: Orb::Models::Price::UnitWithProration::CompositePriceFilter::operator + attr_accessor operator: Orb::Models::Price::TieredWithProration::CompositePriceFilter::operator attr_accessor values: ::Array[String] def initialize: ( - field: Orb::Models::Price::UnitWithProration::CompositePriceFilter::field, - operator: Orb::Models::Price::UnitWithProration::CompositePriceFilter::operator, + field: Orb::Models::Price::TieredWithProration::CompositePriceFilter::field, + operator: Orb::Models::Price::TieredWithProration::CompositePriceFilter::operator, values: ::Array[String] ) -> void def to_hash: -> { - field: Orb::Models::Price::UnitWithProration::CompositePriceFilter::field, - operator: Orb::Models::Price::UnitWithProration::CompositePriceFilter::operator, + field: Orb::Models::Price::TieredWithProration::CompositePriceFilter::field, + operator: Orb::Models::Price::TieredWithProration::CompositePriceFilter::operator, values: ::Array[String] } @@ -4673,7 +4749,7 @@ module Orb CURRENCY: :currency PRICING_UNIT_ID: :pricing_unit_id - def self?.values: -> ::Array[Orb::Models::Price::UnitWithProration::CompositePriceFilter::field] + def self?.values: -> ::Array[Orb::Models::Price::TieredWithProration::CompositePriceFilter::field] end type operator = :includes | :excludes @@ -4684,7 +4760,7 @@ module Orb INCLUDES: :includes EXCLUDES: :excludes - def self?.values: -> ::Array[Orb::Models::Price::UnitWithProration::CompositePriceFilter::operator] + def self?.values: -> ::Array[Orb::Models::Price::TieredWithProration::CompositePriceFilter::operator] end end @@ -4697,17 +4773,39 @@ module Orb FIXED_PRICE: :fixed_price COMPOSITE_PRICE: :composite_price - def self?.values: -> ::Array[Orb::Models::Price::UnitWithProration::price_type] + def self?.values: -> ::Array[Orb::Models::Price::TieredWithProration::price_type] end - type unit_with_proration_config = { unit_amount: String } + type tiered_with_proration_config = + { + tiers: ::Array[Orb::Price::TieredWithProration::TieredWithProrationConfig::Tier] + } - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + attr_accessor tiers: ::Array[Orb::Price::TieredWithProration::TieredWithProrationConfig::Tier] - def initialize: (unit_amount: String) -> void + def initialize: ( + tiers: ::Array[Orb::Price::TieredWithProration::TieredWithProrationConfig::Tier] + ) -> void - def to_hash: -> { unit_amount: String } + def to_hash: -> { + tiers: ::Array[Orb::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 type license_type = { id: String, grouping_key: String, name: String } @@ -4729,23 +4827,22 @@ module Orb end end - type grouped_allocation = + type unit_with_proration = { id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::GroupedAllocation::billing_mode, - cadence: Orb::Models::Price::GroupedAllocation::cadence, - composite_price_filters: ::Array[Orb::Price::GroupedAllocation::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::UnitWithProration::billing_mode, + cadence: Orb::Models::Price::UnitWithProration::cadence, + composite_price_filters: ::Array[Orb::Price::UnitWithProration::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::GroupedAllocation::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::UnitWithProration::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - grouped_allocation_config: Orb::Price::GroupedAllocation::GroupedAllocationConfig, invoice_grouping_key: String?, invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, item: Orb::ItemSlim, @@ -4754,31 +4851,32 @@ module Orb metadata: ::Hash[Symbol, String], minimum: Orb::Minimum?, minimum_amount: String?, - model_type: :grouped_allocation, + model_type: :unit_with_proration, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::GroupedAllocation::price_type, + price_type: Orb::Models::Price::UnitWithProration::price_type, replaces_price_id: String?, + unit_with_proration_config: Orb::Price::UnitWithProration::UnitWithProrationConfig, dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - license_type: Orb::Price::GroupedAllocation::LicenseType? + license_type: Orb::Price::UnitWithProration::LicenseType? } - class GroupedAllocation < Orb::Internal::Type::BaseModel + class UnitWithProration < Orb::Internal::Type::BaseModel attr_accessor id: String attr_accessor billable_metric: Orb::BillableMetricTiny? attr_accessor billing_cycle_configuration: Orb::BillingCycleConfiguration - attr_accessor billing_mode: Orb::Models::Price::GroupedAllocation::billing_mode + attr_accessor billing_mode: Orb::Models::Price::UnitWithProration::billing_mode - attr_accessor cadence: Orb::Models::Price::GroupedAllocation::cadence + attr_accessor cadence: Orb::Models::Price::UnitWithProration::cadence - attr_accessor composite_price_filters: ::Array[Orb::Price::GroupedAllocation::CompositePriceFilter]? + attr_accessor composite_price_filters: ::Array[Orb::Price::UnitWithProration::CompositePriceFilter]? attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Price::GroupedAllocation::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Price::UnitWithProration::conversion_rate_config? attr_accessor created_at: Time @@ -4792,8 +4890,6 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor grouped_allocation_config: Orb::Price::GroupedAllocation::GroupedAllocationConfig - attr_accessor invoice_grouping_key: String? attr_accessor invoicing_cycle_configuration: Orb::BillingCycleConfiguration? @@ -4810,36 +4906,37 @@ module Orb attr_accessor minimum_amount: String? - attr_accessor model_type: :grouped_allocation + attr_accessor model_type: :unit_with_proration attr_accessor name: String attr_accessor plan_phase_order: Integer? - attr_accessor price_type: Orb::Models::Price::GroupedAllocation::price_type + attr_accessor price_type: Orb::Models::Price::UnitWithProration::price_type attr_accessor replaces_price_id: String? + attr_accessor unit_with_proration_config: Orb::Price::UnitWithProration::UnitWithProrationConfig + attr_accessor dimensional_price_configuration: Orb::DimensionalPriceConfiguration? - attr_accessor license_type: Orb::Price::GroupedAllocation::LicenseType? + attr_accessor license_type: Orb::Price::UnitWithProration::LicenseType? def initialize: ( id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::GroupedAllocation::billing_mode, - cadence: Orb::Models::Price::GroupedAllocation::cadence, - composite_price_filters: ::Array[Orb::Price::GroupedAllocation::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::UnitWithProration::billing_mode, + cadence: Orb::Models::Price::UnitWithProration::cadence, + composite_price_filters: ::Array[Orb::Price::UnitWithProration::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::GroupedAllocation::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::UnitWithProration::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - grouped_allocation_config: Orb::Price::GroupedAllocation::GroupedAllocationConfig, invoice_grouping_key: String?, invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, item: Orb::ItemSlim, @@ -4850,29 +4947,29 @@ module Orb minimum_amount: String?, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::GroupedAllocation::price_type, + price_type: Orb::Models::Price::UnitWithProration::price_type, replaces_price_id: String?, + unit_with_proration_config: Orb::Price::UnitWithProration::UnitWithProrationConfig, ?dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - ?license_type: Orb::Price::GroupedAllocation::LicenseType?, - ?model_type: :grouped_allocation + ?license_type: Orb::Price::UnitWithProration::LicenseType?, + ?model_type: :unit_with_proration ) -> void def to_hash: -> { id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::GroupedAllocation::billing_mode, - cadence: Orb::Models::Price::GroupedAllocation::cadence, - composite_price_filters: ::Array[Orb::Price::GroupedAllocation::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::UnitWithProration::billing_mode, + cadence: Orb::Models::Price::UnitWithProration::cadence, + composite_price_filters: ::Array[Orb::Price::UnitWithProration::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::GroupedAllocation::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::UnitWithProration::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - grouped_allocation_config: Orb::Price::GroupedAllocation::GroupedAllocationConfig, invoice_grouping_key: String?, invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, item: Orb::ItemSlim, @@ -4881,13 +4978,14 @@ module Orb metadata: ::Hash[Symbol, String], minimum: Orb::Minimum?, minimum_amount: String?, - model_type: :grouped_allocation, + model_type: :unit_with_proration, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::GroupedAllocation::price_type, + price_type: Orb::Models::Price::UnitWithProration::price_type, replaces_price_id: String?, + unit_with_proration_config: Orb::Price::UnitWithProration::UnitWithProrationConfig, dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - license_type: Orb::Price::GroupedAllocation::LicenseType? + license_type: Orb::Price::UnitWithProration::LicenseType? } type billing_mode = :in_advance | :in_arrear @@ -4898,7 +4996,7 @@ module Orb IN_ADVANCE: :in_advance IN_ARREAR: :in_arrear - def self?.values: -> ::Array[Orb::Models::Price::GroupedAllocation::billing_mode] + def self?.values: -> ::Array[Orb::Models::Price::UnitWithProration::billing_mode] end type cadence = @@ -4914,32 +5012,32 @@ module Orb ANNUAL: :annual CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Price::GroupedAllocation::cadence] + def self?.values: -> ::Array[Orb::Models::Price::UnitWithProration::cadence] end type composite_price_filter = { - field: Orb::Models::Price::GroupedAllocation::CompositePriceFilter::field, - operator: Orb::Models::Price::GroupedAllocation::CompositePriceFilter::operator, + field: Orb::Models::Price::UnitWithProration::CompositePriceFilter::field, + operator: Orb::Models::Price::UnitWithProration::CompositePriceFilter::operator, values: ::Array[String] } class CompositePriceFilter < Orb::Internal::Type::BaseModel - attr_accessor field: Orb::Models::Price::GroupedAllocation::CompositePriceFilter::field + attr_accessor field: Orb::Models::Price::UnitWithProration::CompositePriceFilter::field - attr_accessor operator: Orb::Models::Price::GroupedAllocation::CompositePriceFilter::operator + attr_accessor operator: Orb::Models::Price::UnitWithProration::CompositePriceFilter::operator attr_accessor values: ::Array[String] def initialize: ( - field: Orb::Models::Price::GroupedAllocation::CompositePriceFilter::field, - operator: Orb::Models::Price::GroupedAllocation::CompositePriceFilter::operator, + field: Orb::Models::Price::UnitWithProration::CompositePriceFilter::field, + operator: Orb::Models::Price::UnitWithProration::CompositePriceFilter::operator, values: ::Array[String] ) -> void def to_hash: -> { - field: Orb::Models::Price::GroupedAllocation::CompositePriceFilter::field, - operator: Orb::Models::Price::GroupedAllocation::CompositePriceFilter::operator, + field: Orb::Models::Price::UnitWithProration::CompositePriceFilter::field, + operator: Orb::Models::Price::UnitWithProration::CompositePriceFilter::operator, values: ::Array[String] } @@ -4955,7 +5053,7 @@ module Orb CURRENCY: :currency PRICING_UNIT_ID: :pricing_unit_id - def self?.values: -> ::Array[Orb::Models::Price::GroupedAllocation::CompositePriceFilter::field] + def self?.values: -> ::Array[Orb::Models::Price::UnitWithProration::CompositePriceFilter::field] end type operator = :includes | :excludes @@ -4966,37 +5064,10 @@ module Orb INCLUDES: :includes EXCLUDES: :excludes - def self?.values: -> ::Array[Orb::Models::Price::GroupedAllocation::CompositePriceFilter::operator] + def self?.values: -> ::Array[Orb::Models::Price::UnitWithProration::CompositePriceFilter::operator] end 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 price_type = :usage_price | :fixed_price | :composite_price module PriceType @@ -5006,7 +5077,17 @@ module Orb FIXED_PRICE: :fixed_price COMPOSITE_PRICE: :composite_price - def self?.values: -> ::Array[Orb::Models::Price::GroupedAllocation::price_type] + def self?.values: -> ::Array[Orb::Models::Price::UnitWithProration::price_type] + 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 license_type = { id: String, grouping_key: String, name: String } @@ -5028,23 +5109,23 @@ module Orb end end - type bulk_with_proration = + type grouped_allocation = { id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::BulkWithProration::billing_mode, - bulk_with_proration_config: Orb::Price::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::Price::BulkWithProration::cadence, - composite_price_filters: ::Array[Orb::Price::BulkWithProration::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::GroupedAllocation::billing_mode, + cadence: Orb::Models::Price::GroupedAllocation::cadence, + composite_price_filters: ::Array[Orb::Price::GroupedAllocation::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::BulkWithProration::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::GroupedAllocation::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, + grouped_allocation_config: Orb::Price::GroupedAllocation::GroupedAllocationConfig, invoice_grouping_key: String?, invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, item: Orb::ItemSlim, @@ -5053,33 +5134,31 @@ module Orb metadata: ::Hash[Symbol, String], minimum: Orb::Minimum?, minimum_amount: String?, - model_type: :bulk_with_proration, + model_type: :grouped_allocation, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::BulkWithProration::price_type, + price_type: Orb::Models::Price::GroupedAllocation::price_type, replaces_price_id: String?, dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - license_type: Orb::Price::BulkWithProration::LicenseType? + license_type: Orb::Price::GroupedAllocation::LicenseType? } - class BulkWithProration < Orb::Internal::Type::BaseModel + class GroupedAllocation < Orb::Internal::Type::BaseModel attr_accessor id: String attr_accessor billable_metric: Orb::BillableMetricTiny? attr_accessor billing_cycle_configuration: Orb::BillingCycleConfiguration - attr_accessor billing_mode: Orb::Models::Price::BulkWithProration::billing_mode - - attr_accessor bulk_with_proration_config: Orb::Price::BulkWithProration::BulkWithProrationConfig + attr_accessor billing_mode: Orb::Models::Price::GroupedAllocation::billing_mode - attr_accessor cadence: Orb::Models::Price::BulkWithProration::cadence + attr_accessor cadence: Orb::Models::Price::GroupedAllocation::cadence - attr_accessor composite_price_filters: ::Array[Orb::Price::BulkWithProration::CompositePriceFilter]? + attr_accessor composite_price_filters: ::Array[Orb::Price::GroupedAllocation::CompositePriceFilter]? attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Price::BulkWithProration::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Price::GroupedAllocation::conversion_rate_config? attr_accessor created_at: Time @@ -5093,6 +5172,8 @@ module Orb attr_accessor fixed_price_quantity: Float? + attr_accessor grouped_allocation_config: Orb::Price::GroupedAllocation::GroupedAllocationConfig + attr_accessor invoice_grouping_key: String? attr_accessor invoicing_cycle_configuration: Orb::BillingCycleConfiguration? @@ -5109,36 +5190,36 @@ module Orb attr_accessor minimum_amount: String? - attr_accessor model_type: :bulk_with_proration + attr_accessor model_type: :grouped_allocation attr_accessor name: String attr_accessor plan_phase_order: Integer? - attr_accessor price_type: Orb::Models::Price::BulkWithProration::price_type + attr_accessor price_type: Orb::Models::Price::GroupedAllocation::price_type attr_accessor replaces_price_id: String? attr_accessor dimensional_price_configuration: Orb::DimensionalPriceConfiguration? - attr_accessor license_type: Orb::Price::BulkWithProration::LicenseType? + attr_accessor license_type: Orb::Price::GroupedAllocation::LicenseType? def initialize: ( id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::BulkWithProration::billing_mode, - bulk_with_proration_config: Orb::Price::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::Price::BulkWithProration::cadence, - composite_price_filters: ::Array[Orb::Price::BulkWithProration::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::GroupedAllocation::billing_mode, + cadence: Orb::Models::Price::GroupedAllocation::cadence, + composite_price_filters: ::Array[Orb::Price::GroupedAllocation::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::BulkWithProration::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::GroupedAllocation::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, + grouped_allocation_config: Orb::Price::GroupedAllocation::GroupedAllocationConfig, invoice_grouping_key: String?, invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, item: Orb::ItemSlim, @@ -5149,29 +5230,29 @@ module Orb minimum_amount: String?, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::BulkWithProration::price_type, + price_type: Orb::Models::Price::GroupedAllocation::price_type, replaces_price_id: String?, ?dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - ?license_type: Orb::Price::BulkWithProration::LicenseType?, - ?model_type: :bulk_with_proration + ?license_type: Orb::Price::GroupedAllocation::LicenseType?, + ?model_type: :grouped_allocation ) -> void def to_hash: -> { id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::BulkWithProration::billing_mode, - bulk_with_proration_config: Orb::Price::BulkWithProration::BulkWithProrationConfig, - cadence: Orb::Models::Price::BulkWithProration::cadence, - composite_price_filters: ::Array[Orb::Price::BulkWithProration::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::GroupedAllocation::billing_mode, + cadence: Orb::Models::Price::GroupedAllocation::cadence, + composite_price_filters: ::Array[Orb::Price::GroupedAllocation::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::BulkWithProration::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::GroupedAllocation::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, + grouped_allocation_config: Orb::Price::GroupedAllocation::GroupedAllocationConfig, invoice_grouping_key: String?, invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, item: Orb::ItemSlim, @@ -5180,13 +5261,13 @@ module Orb metadata: ::Hash[Symbol, String], minimum: Orb::Minimum?, minimum_amount: String?, - model_type: :bulk_with_proration, + model_type: :grouped_allocation, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::BulkWithProration::price_type, + price_type: Orb::Models::Price::GroupedAllocation::price_type, replaces_price_id: String?, dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - license_type: Orb::Price::BulkWithProration::LicenseType? + license_type: Orb::Price::GroupedAllocation::LicenseType? } type billing_mode = :in_advance | :in_arrear @@ -5197,39 +5278,7 @@ module Orb IN_ADVANCE: :in_advance IN_ARREAR: :in_arrear - def self?.values: -> ::Array[Orb::Models::Price::BulkWithProration::billing_mode] - end - - type bulk_with_proration_config = - { - tiers: ::Array[Orb::Price::BulkWithProration::BulkWithProrationConfig::Tier] - } - - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::Price::BulkWithProration::BulkWithProrationConfig::Tier] - - def initialize: ( - tiers: ::Array[Orb::Price::BulkWithProration::BulkWithProrationConfig::Tier] - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::Price::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 + def self?.values: -> ::Array[Orb::Models::Price::GroupedAllocation::billing_mode] end type cadence = @@ -5245,32 +5294,32 @@ module Orb ANNUAL: :annual CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Price::BulkWithProration::cadence] + def self?.values: -> ::Array[Orb::Models::Price::GroupedAllocation::cadence] end type composite_price_filter = { - field: Orb::Models::Price::BulkWithProration::CompositePriceFilter::field, - operator: Orb::Models::Price::BulkWithProration::CompositePriceFilter::operator, + field: Orb::Models::Price::GroupedAllocation::CompositePriceFilter::field, + operator: Orb::Models::Price::GroupedAllocation::CompositePriceFilter::operator, values: ::Array[String] } class CompositePriceFilter < Orb::Internal::Type::BaseModel - attr_accessor field: Orb::Models::Price::BulkWithProration::CompositePriceFilter::field + attr_accessor field: Orb::Models::Price::GroupedAllocation::CompositePriceFilter::field - attr_accessor operator: Orb::Models::Price::BulkWithProration::CompositePriceFilter::operator + attr_accessor operator: Orb::Models::Price::GroupedAllocation::CompositePriceFilter::operator attr_accessor values: ::Array[String] def initialize: ( - field: Orb::Models::Price::BulkWithProration::CompositePriceFilter::field, - operator: Orb::Models::Price::BulkWithProration::CompositePriceFilter::operator, + field: Orb::Models::Price::GroupedAllocation::CompositePriceFilter::field, + operator: Orb::Models::Price::GroupedAllocation::CompositePriceFilter::operator, values: ::Array[String] ) -> void def to_hash: -> { - field: Orb::Models::Price::BulkWithProration::CompositePriceFilter::field, - operator: Orb::Models::Price::BulkWithProration::CompositePriceFilter::operator, + field: Orb::Models::Price::GroupedAllocation::CompositePriceFilter::field, + operator: Orb::Models::Price::GroupedAllocation::CompositePriceFilter::operator, values: ::Array[String] } @@ -5286,7 +5335,7 @@ module Orb CURRENCY: :currency PRICING_UNIT_ID: :pricing_unit_id - def self?.values: -> ::Array[Orb::Models::Price::BulkWithProration::CompositePriceFilter::field] + def self?.values: -> ::Array[Orb::Models::Price::GroupedAllocation::CompositePriceFilter::field] end type operator = :includes | :excludes @@ -5297,11 +5346,38 @@ module Orb INCLUDES: :includes EXCLUDES: :excludes - def self?.values: -> ::Array[Orb::Models::Price::BulkWithProration::CompositePriceFilter::operator] + def self?.values: -> ::Array[Orb::Models::Price::GroupedAllocation::CompositePriceFilter::operator] end end - type price_type = :usage_price | :fixed_price | :composite_price + 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 price_type = :usage_price | :fixed_price | :composite_price module PriceType extend Orb::Internal::Type::Enum @@ -5310,7 +5386,7 @@ module Orb FIXED_PRICE: :fixed_price COMPOSITE_PRICE: :composite_price - def self?.values: -> ::Array[Orb::Models::Price::BulkWithProration::price_type] + def self?.values: -> ::Array[Orb::Models::Price::GroupedAllocation::price_type] end type license_type = { id: String, grouping_key: String, name: String } @@ -5332,23 +5408,23 @@ module Orb end end - type grouped_with_prorated_minimum = + type bulk_with_proration = { id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::GroupedWithProratedMinimum::billing_mode, - cadence: Orb::Models::Price::GroupedWithProratedMinimum::cadence, - composite_price_filters: ::Array[Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::BulkWithProration::billing_mode, + bulk_with_proration_config: Orb::Price::BulkWithProration::BulkWithProrationConfig, + cadence: Orb::Models::Price::BulkWithProration::cadence, + composite_price_filters: ::Array[Orb::Price::BulkWithProration::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::GroupedWithProratedMinimum::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::BulkWithProration::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - grouped_with_prorated_minimum_config: Orb::Price::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, invoice_grouping_key: String?, invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, item: Orb::ItemSlim, @@ -5357,31 +5433,33 @@ module Orb metadata: ::Hash[Symbol, String], minimum: Orb::Minimum?, minimum_amount: String?, - model_type: :grouped_with_prorated_minimum, + model_type: :bulk_with_proration, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::GroupedWithProratedMinimum::price_type, + price_type: Orb::Models::Price::BulkWithProration::price_type, replaces_price_id: String?, dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - license_type: Orb::Price::GroupedWithProratedMinimum::LicenseType? + license_type: Orb::Price::BulkWithProration::LicenseType? } - class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel + class BulkWithProration < Orb::Internal::Type::BaseModel attr_accessor id: String attr_accessor billable_metric: Orb::BillableMetricTiny? attr_accessor billing_cycle_configuration: Orb::BillingCycleConfiguration - attr_accessor billing_mode: Orb::Models::Price::GroupedWithProratedMinimum::billing_mode + attr_accessor billing_mode: Orb::Models::Price::BulkWithProration::billing_mode - attr_accessor cadence: Orb::Models::Price::GroupedWithProratedMinimum::cadence + attr_accessor bulk_with_proration_config: Orb::Price::BulkWithProration::BulkWithProrationConfig - attr_accessor composite_price_filters: ::Array[Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter]? + attr_accessor cadence: Orb::Models::Price::BulkWithProration::cadence + + attr_accessor composite_price_filters: ::Array[Orb::Price::BulkWithProration::CompositePriceFilter]? attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Price::GroupedWithProratedMinimum::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Price::BulkWithProration::conversion_rate_config? attr_accessor created_at: Time @@ -5395,8 +5473,6 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor grouped_with_prorated_minimum_config: Orb::Price::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig - attr_accessor invoice_grouping_key: String? attr_accessor invoicing_cycle_configuration: Orb::BillingCycleConfiguration? @@ -5413,36 +5489,36 @@ module Orb attr_accessor minimum_amount: String? - attr_accessor model_type: :grouped_with_prorated_minimum + attr_accessor model_type: :bulk_with_proration attr_accessor name: String attr_accessor plan_phase_order: Integer? - attr_accessor price_type: Orb::Models::Price::GroupedWithProratedMinimum::price_type + attr_accessor price_type: Orb::Models::Price::BulkWithProration::price_type attr_accessor replaces_price_id: String? attr_accessor dimensional_price_configuration: Orb::DimensionalPriceConfiguration? - attr_accessor license_type: Orb::Price::GroupedWithProratedMinimum::LicenseType? + attr_accessor license_type: Orb::Price::BulkWithProration::LicenseType? def initialize: ( id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::GroupedWithProratedMinimum::billing_mode, - cadence: Orb::Models::Price::GroupedWithProratedMinimum::cadence, - composite_price_filters: ::Array[Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::BulkWithProration::billing_mode, + bulk_with_proration_config: Orb::Price::BulkWithProration::BulkWithProrationConfig, + cadence: Orb::Models::Price::BulkWithProration::cadence, + composite_price_filters: ::Array[Orb::Price::BulkWithProration::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::GroupedWithProratedMinimum::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::BulkWithProration::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - grouped_with_prorated_minimum_config: Orb::Price::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, invoice_grouping_key: String?, invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, item: Orb::ItemSlim, @@ -5453,29 +5529,29 @@ module Orb minimum_amount: String?, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::GroupedWithProratedMinimum::price_type, + price_type: Orb::Models::Price::BulkWithProration::price_type, replaces_price_id: String?, ?dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - ?license_type: Orb::Price::GroupedWithProratedMinimum::LicenseType?, - ?model_type: :grouped_with_prorated_minimum + ?license_type: Orb::Price::BulkWithProration::LicenseType?, + ?model_type: :bulk_with_proration ) -> void def to_hash: -> { id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::GroupedWithProratedMinimum::billing_mode, - cadence: Orb::Models::Price::GroupedWithProratedMinimum::cadence, - composite_price_filters: ::Array[Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::BulkWithProration::billing_mode, + bulk_with_proration_config: Orb::Price::BulkWithProration::BulkWithProrationConfig, + cadence: Orb::Models::Price::BulkWithProration::cadence, + composite_price_filters: ::Array[Orb::Price::BulkWithProration::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::GroupedWithProratedMinimum::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::BulkWithProration::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - grouped_with_prorated_minimum_config: Orb::Price::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, invoice_grouping_key: String?, invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, item: Orb::ItemSlim, @@ -5484,13 +5560,13 @@ module Orb metadata: ::Hash[Symbol, String], minimum: Orb::Minimum?, minimum_amount: String?, - model_type: :grouped_with_prorated_minimum, + model_type: :bulk_with_proration, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::GroupedWithProratedMinimum::price_type, + price_type: Orb::Models::Price::BulkWithProration::price_type, replaces_price_id: String?, dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - license_type: Orb::Price::GroupedWithProratedMinimum::LicenseType? + license_type: Orb::Price::BulkWithProration::LicenseType? } type billing_mode = :in_advance | :in_arrear @@ -5501,7 +5577,39 @@ module Orb IN_ADVANCE: :in_advance IN_ARREAR: :in_arrear - def self?.values: -> ::Array[Orb::Models::Price::GroupedWithProratedMinimum::billing_mode] + def self?.values: -> ::Array[Orb::Models::Price::BulkWithProration::billing_mode] + end + + type bulk_with_proration_config = + { + tiers: ::Array[Orb::Price::BulkWithProration::BulkWithProrationConfig::Tier] + } + + class BulkWithProrationConfig < Orb::Internal::Type::BaseModel + attr_accessor tiers: ::Array[Orb::Price::BulkWithProration::BulkWithProrationConfig::Tier] + + def initialize: ( + tiers: ::Array[Orb::Price::BulkWithProration::BulkWithProrationConfig::Tier] + ) -> void + + def to_hash: -> { + tiers: ::Array[Orb::Price::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 = @@ -5517,32 +5625,32 @@ module Orb ANNUAL: :annual CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Price::GroupedWithProratedMinimum::cadence] + def self?.values: -> ::Array[Orb::Models::Price::BulkWithProration::cadence] end type composite_price_filter = { - field: Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter::field, - operator: Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter::operator, + field: Orb::Models::Price::BulkWithProration::CompositePriceFilter::field, + operator: Orb::Models::Price::BulkWithProration::CompositePriceFilter::operator, values: ::Array[String] } class CompositePriceFilter < Orb::Internal::Type::BaseModel - attr_accessor field: Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter::field + attr_accessor field: Orb::Models::Price::BulkWithProration::CompositePriceFilter::field - attr_accessor operator: Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter::operator + attr_accessor operator: Orb::Models::Price::BulkWithProration::CompositePriceFilter::operator attr_accessor values: ::Array[String] def initialize: ( - field: Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter::field, - operator: Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter::operator, + field: Orb::Models::Price::BulkWithProration::CompositePriceFilter::field, + operator: Orb::Models::Price::BulkWithProration::CompositePriceFilter::operator, values: ::Array[String] ) -> void def to_hash: -> { - field: Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter::field, - operator: Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter::operator, + field: Orb::Models::Price::BulkWithProration::CompositePriceFilter::field, + operator: Orb::Models::Price::BulkWithProration::CompositePriceFilter::operator, values: ::Array[String] } @@ -5558,7 +5666,7 @@ module Orb CURRENCY: :currency PRICING_UNIT_ID: :pricing_unit_id - def self?.values: -> ::Array[Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter::field] + def self?.values: -> ::Array[Orb::Models::Price::BulkWithProration::CompositePriceFilter::field] end type operator = :includes | :excludes @@ -5569,33 +5677,10 @@ module Orb INCLUDES: :includes EXCLUDES: :excludes - def self?.values: -> ::Array[Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter::operator] + def self?.values: -> ::Array[Orb::Models::Price::BulkWithProration::CompositePriceFilter::operator] 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 price_type = :usage_price | :fixed_price | :composite_price module PriceType @@ -5605,7 +5690,7 @@ module Orb FIXED_PRICE: :fixed_price COMPOSITE_PRICE: :composite_price - def self?.values: -> ::Array[Orb::Models::Price::GroupedWithProratedMinimum::price_type] + def self?.values: -> ::Array[Orb::Models::Price::BulkWithProration::price_type] end type license_type = { id: String, grouping_key: String, name: String } @@ -5627,23 +5712,23 @@ module Orb end end - type grouped_with_metered_minimum = + type grouped_with_prorated_minimum = { id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::GroupedWithMeteredMinimum::billing_mode, - cadence: Orb::Models::Price::GroupedWithMeteredMinimum::cadence, - composite_price_filters: ::Array[Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::GroupedWithProratedMinimum::billing_mode, + cadence: Orb::Models::Price::GroupedWithProratedMinimum::cadence, + composite_price_filters: ::Array[Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::GroupedWithMeteredMinimum::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::GroupedWithProratedMinimum::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - grouped_with_metered_minimum_config: Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, + grouped_with_prorated_minimum_config: Orb::Price::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, invoice_grouping_key: String?, invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, item: Orb::ItemSlim, @@ -5652,31 +5737,31 @@ module Orb metadata: ::Hash[Symbol, String], minimum: Orb::Minimum?, minimum_amount: String?, - model_type: :grouped_with_metered_minimum, + model_type: :grouped_with_prorated_minimum, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::GroupedWithMeteredMinimum::price_type, + price_type: Orb::Models::Price::GroupedWithProratedMinimum::price_type, replaces_price_id: String?, dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - license_type: Orb::Price::GroupedWithMeteredMinimum::LicenseType? + license_type: Orb::Price::GroupedWithProratedMinimum::LicenseType? } - class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel + class GroupedWithProratedMinimum < Orb::Internal::Type::BaseModel attr_accessor id: String attr_accessor billable_metric: Orb::BillableMetricTiny? attr_accessor billing_cycle_configuration: Orb::BillingCycleConfiguration - attr_accessor billing_mode: Orb::Models::Price::GroupedWithMeteredMinimum::billing_mode + attr_accessor billing_mode: Orb::Models::Price::GroupedWithProratedMinimum::billing_mode - attr_accessor cadence: Orb::Models::Price::GroupedWithMeteredMinimum::cadence + attr_accessor cadence: Orb::Models::Price::GroupedWithProratedMinimum::cadence - attr_accessor composite_price_filters: ::Array[Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter]? + attr_accessor composite_price_filters: ::Array[Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter]? attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Price::GroupedWithMeteredMinimum::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Price::GroupedWithProratedMinimum::conversion_rate_config? attr_accessor created_at: Time @@ -5690,7 +5775,7 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor grouped_with_metered_minimum_config: Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig + attr_accessor grouped_with_prorated_minimum_config: Orb::Price::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig attr_accessor invoice_grouping_key: String? @@ -5708,36 +5793,36 @@ module Orb attr_accessor minimum_amount: String? - attr_accessor model_type: :grouped_with_metered_minimum + attr_accessor model_type: :grouped_with_prorated_minimum attr_accessor name: String attr_accessor plan_phase_order: Integer? - attr_accessor price_type: Orb::Models::Price::GroupedWithMeteredMinimum::price_type + attr_accessor price_type: Orb::Models::Price::GroupedWithProratedMinimum::price_type attr_accessor replaces_price_id: String? attr_accessor dimensional_price_configuration: Orb::DimensionalPriceConfiguration? - attr_accessor license_type: Orb::Price::GroupedWithMeteredMinimum::LicenseType? + attr_accessor license_type: Orb::Price::GroupedWithProratedMinimum::LicenseType? def initialize: ( id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::GroupedWithMeteredMinimum::billing_mode, - cadence: Orb::Models::Price::GroupedWithMeteredMinimum::cadence, - composite_price_filters: ::Array[Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::GroupedWithProratedMinimum::billing_mode, + cadence: Orb::Models::Price::GroupedWithProratedMinimum::cadence, + composite_price_filters: ::Array[Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::GroupedWithMeteredMinimum::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::GroupedWithProratedMinimum::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - grouped_with_metered_minimum_config: Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, + grouped_with_prorated_minimum_config: Orb::Price::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, invoice_grouping_key: String?, invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, item: Orb::ItemSlim, @@ -5748,29 +5833,29 @@ module Orb minimum_amount: String?, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::GroupedWithMeteredMinimum::price_type, + price_type: Orb::Models::Price::GroupedWithProratedMinimum::price_type, replaces_price_id: String?, ?dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - ?license_type: Orb::Price::GroupedWithMeteredMinimum::LicenseType?, - ?model_type: :grouped_with_metered_minimum + ?license_type: Orb::Price::GroupedWithProratedMinimum::LicenseType?, + ?model_type: :grouped_with_prorated_minimum ) -> void def to_hash: -> { id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::GroupedWithMeteredMinimum::billing_mode, - cadence: Orb::Models::Price::GroupedWithMeteredMinimum::cadence, - composite_price_filters: ::Array[Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::GroupedWithProratedMinimum::billing_mode, + cadence: Orb::Models::Price::GroupedWithProratedMinimum::cadence, + composite_price_filters: ::Array[Orb::Price::GroupedWithProratedMinimum::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::GroupedWithMeteredMinimum::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::GroupedWithProratedMinimum::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - grouped_with_metered_minimum_config: Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, + grouped_with_prorated_minimum_config: Orb::Price::GroupedWithProratedMinimum::GroupedWithProratedMinimumConfig, invoice_grouping_key: String?, invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, item: Orb::ItemSlim, @@ -5779,13 +5864,13 @@ module Orb metadata: ::Hash[Symbol, String], minimum: Orb::Minimum?, minimum_amount: String?, - model_type: :grouped_with_metered_minimum, + model_type: :grouped_with_prorated_minimum, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::GroupedWithMeteredMinimum::price_type, + price_type: Orb::Models::Price::GroupedWithProratedMinimum::price_type, replaces_price_id: String?, dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - license_type: Orb::Price::GroupedWithMeteredMinimum::LicenseType? + license_type: Orb::Price::GroupedWithProratedMinimum::LicenseType? } type billing_mode = :in_advance | :in_arrear @@ -5796,7 +5881,7 @@ module Orb IN_ADVANCE: :in_advance IN_ARREAR: :in_arrear - def self?.values: -> ::Array[Orb::Models::Price::GroupedWithMeteredMinimum::billing_mode] + def self?.values: -> ::Array[Orb::Models::Price::GroupedWithProratedMinimum::billing_mode] end type cadence = @@ -5812,32 +5897,32 @@ module Orb ANNUAL: :annual CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Price::GroupedWithMeteredMinimum::cadence] + def self?.values: -> ::Array[Orb::Models::Price::GroupedWithProratedMinimum::cadence] end type composite_price_filter = { - field: Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter::field, - operator: Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter::operator, + field: Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter::field, + operator: Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter::operator, values: ::Array[String] } class CompositePriceFilter < Orb::Internal::Type::BaseModel - attr_accessor field: Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter::field + attr_accessor field: Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter::field - attr_accessor operator: Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter::operator + attr_accessor operator: Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter::operator attr_accessor values: ::Array[String] def initialize: ( - field: Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter::field, - operator: Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter::operator, + field: Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter::field, + operator: Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter::operator, values: ::Array[String] ) -> void def to_hash: -> { - field: Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter::field, - operator: Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter::operator, + field: Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter::field, + operator: Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter::operator, values: ::Array[String] } @@ -5853,7 +5938,7 @@ module Orb CURRENCY: :currency PRICING_UNIT_ID: :pricing_unit_id - def self?.values: -> ::Array[Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter::field] + def self?.values: -> ::Array[Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter::field] end type operator = :includes | :excludes @@ -5864,78 +5949,31 @@ module Orb INCLUDES: :includes EXCLUDES: :excludes - def self?.values: -> ::Array[Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter::operator] + def self?.values: -> ::Array[Orb::Models::Price::GroupedWithProratedMinimum::CompositePriceFilter::operator] end end - type grouped_with_metered_minimum_config = - { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] - } + type grouped_with_prorated_minimum_config = + { grouping_key: String, minimum: String, unit_rate: String } - class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel + class GroupedWithProratedMinimumConfig < 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::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor] - - attr_accessor scaling_key: String + attr_accessor minimum: String - attr_accessor unit_amounts: ::Array[Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] + attr_accessor unit_rate: String def initialize: ( grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] + minimum: String, + unit_rate: String ) -> void def to_hash: -> { grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] + minimum: String, + unit_rate: String } - - 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 price_type = :usage_price | :fixed_price | :composite_price @@ -5947,7 +5985,7 @@ module Orb FIXED_PRICE: :fixed_price COMPOSITE_PRICE: :composite_price - def self?.values: -> ::Array[Orb::Models::Price::GroupedWithMeteredMinimum::price_type] + def self?.values: -> ::Array[Orb::Models::Price::GroupedWithProratedMinimum::price_type] end type license_type = { id: String, grouping_key: String, name: String } @@ -5969,23 +6007,23 @@ module Orb end end - type grouped_with_min_max_thresholds = + type grouped_with_metered_minimum = { id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::GroupedWithMinMaxThresholds::billing_mode, - cadence: Orb::Models::Price::GroupedWithMinMaxThresholds::cadence, - composite_price_filters: ::Array[Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::GroupedWithMeteredMinimum::billing_mode, + cadence: Orb::Models::Price::GroupedWithMeteredMinimum::cadence, + composite_price_filters: ::Array[Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::GroupedWithMeteredMinimum::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - grouped_with_min_max_thresholds_config: Orb::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + grouped_with_metered_minimum_config: Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, invoice_grouping_key: String?, invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, item: Orb::ItemSlim, @@ -5994,31 +6032,31 @@ module Orb metadata: ::Hash[Symbol, String], minimum: Orb::Minimum?, minimum_amount: String?, - model_type: :grouped_with_min_max_thresholds, + model_type: :grouped_with_metered_minimum, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::GroupedWithMinMaxThresholds::price_type, + price_type: Orb::Models::Price::GroupedWithMeteredMinimum::price_type, replaces_price_id: String?, dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - license_type: Orb::Price::GroupedWithMinMaxThresholds::LicenseType? + license_type: Orb::Price::GroupedWithMeteredMinimum::LicenseType? } - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + class GroupedWithMeteredMinimum < Orb::Internal::Type::BaseModel attr_accessor id: String attr_accessor billable_metric: Orb::BillableMetricTiny? attr_accessor billing_cycle_configuration: Orb::BillingCycleConfiguration - attr_accessor billing_mode: Orb::Models::Price::GroupedWithMinMaxThresholds::billing_mode + attr_accessor billing_mode: Orb::Models::Price::GroupedWithMeteredMinimum::billing_mode - attr_accessor cadence: Orb::Models::Price::GroupedWithMinMaxThresholds::cadence + attr_accessor cadence: Orb::Models::Price::GroupedWithMeteredMinimum::cadence - attr_accessor composite_price_filters: ::Array[Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter]? + attr_accessor composite_price_filters: ::Array[Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter]? attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Price::GroupedWithMinMaxThresholds::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Price::GroupedWithMeteredMinimum::conversion_rate_config? attr_accessor created_at: Time @@ -6032,7 +6070,7 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor grouped_with_min_max_thresholds_config: Orb::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + attr_accessor grouped_with_metered_minimum_config: Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig attr_accessor invoice_grouping_key: String? @@ -6050,36 +6088,36 @@ module Orb attr_accessor minimum_amount: String? - attr_accessor model_type: :grouped_with_min_max_thresholds + attr_accessor model_type: :grouped_with_metered_minimum attr_accessor name: String attr_accessor plan_phase_order: Integer? - attr_accessor price_type: Orb::Models::Price::GroupedWithMinMaxThresholds::price_type + attr_accessor price_type: Orb::Models::Price::GroupedWithMeteredMinimum::price_type attr_accessor replaces_price_id: String? attr_accessor dimensional_price_configuration: Orb::DimensionalPriceConfiguration? - attr_accessor license_type: Orb::Price::GroupedWithMinMaxThresholds::LicenseType? + attr_accessor license_type: Orb::Price::GroupedWithMeteredMinimum::LicenseType? def initialize: ( id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::GroupedWithMinMaxThresholds::billing_mode, - cadence: Orb::Models::Price::GroupedWithMinMaxThresholds::cadence, - composite_price_filters: ::Array[Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::GroupedWithMeteredMinimum::billing_mode, + cadence: Orb::Models::Price::GroupedWithMeteredMinimum::cadence, + composite_price_filters: ::Array[Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::GroupedWithMeteredMinimum::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - grouped_with_min_max_thresholds_config: Orb::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + grouped_with_metered_minimum_config: Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, invoice_grouping_key: String?, invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, item: Orb::ItemSlim, @@ -6090,29 +6128,29 @@ module Orb minimum_amount: String?, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::GroupedWithMinMaxThresholds::price_type, + price_type: Orb::Models::Price::GroupedWithMeteredMinimum::price_type, replaces_price_id: String?, ?dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - ?license_type: Orb::Price::GroupedWithMinMaxThresholds::LicenseType?, - ?model_type: :grouped_with_min_max_thresholds + ?license_type: Orb::Price::GroupedWithMeteredMinimum::LicenseType?, + ?model_type: :grouped_with_metered_minimum ) -> void def to_hash: -> { id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::GroupedWithMinMaxThresholds::billing_mode, - cadence: Orb::Models::Price::GroupedWithMinMaxThresholds::cadence, - composite_price_filters: ::Array[Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::GroupedWithMeteredMinimum::billing_mode, + cadence: Orb::Models::Price::GroupedWithMeteredMinimum::cadence, + composite_price_filters: ::Array[Orb::Price::GroupedWithMeteredMinimum::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::GroupedWithMeteredMinimum::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - grouped_with_min_max_thresholds_config: Orb::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + grouped_with_metered_minimum_config: Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig, invoice_grouping_key: String?, invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, item: Orb::ItemSlim, @@ -6121,13 +6159,13 @@ module Orb metadata: ::Hash[Symbol, String], minimum: Orb::Minimum?, minimum_amount: String?, - model_type: :grouped_with_min_max_thresholds, + model_type: :grouped_with_metered_minimum, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::GroupedWithMinMaxThresholds::price_type, + price_type: Orb::Models::Price::GroupedWithMeteredMinimum::price_type, replaces_price_id: String?, dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - license_type: Orb::Price::GroupedWithMinMaxThresholds::LicenseType? + license_type: Orb::Price::GroupedWithMeteredMinimum::LicenseType? } type billing_mode = :in_advance | :in_arrear @@ -6138,7 +6176,7 @@ module Orb IN_ADVANCE: :in_advance IN_ARREAR: :in_arrear - def self?.values: -> ::Array[Orb::Models::Price::GroupedWithMinMaxThresholds::billing_mode] + def self?.values: -> ::Array[Orb::Models::Price::GroupedWithMeteredMinimum::billing_mode] end type cadence = @@ -6154,32 +6192,32 @@ module Orb ANNUAL: :annual CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Price::GroupedWithMinMaxThresholds::cadence] + def self?.values: -> ::Array[Orb::Models::Price::GroupedWithMeteredMinimum::cadence] end type composite_price_filter = { - field: Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::field, - operator: Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::operator, + field: Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter::field, + operator: Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter::operator, values: ::Array[String] } class CompositePriceFilter < Orb::Internal::Type::BaseModel - attr_accessor field: Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::field + attr_accessor field: Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter::field - attr_accessor operator: Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::operator + attr_accessor operator: Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter::operator attr_accessor values: ::Array[String] def initialize: ( - field: Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::field, - operator: Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::operator, + field: Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter::field, + operator: Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter::operator, values: ::Array[String] ) -> void def to_hash: -> { - field: Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::field, - operator: Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::operator, + field: Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter::field, + operator: Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter::operator, values: ::Array[String] } @@ -6195,7 +6233,7 @@ module Orb CURRENCY: :currency PRICING_UNIT_ID: :pricing_unit_id - def self?.values: -> ::Array[Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::field] + def self?.values: -> ::Array[Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter::field] end type operator = :includes | :excludes @@ -6206,40 +6244,78 @@ module Orb INCLUDES: :includes EXCLUDES: :excludes - def self?.values: -> ::Array[Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::operator] + def self?.values: -> ::Array[Orb::Models::Price::GroupedWithMeteredMinimum::CompositePriceFilter::operator] end end - type grouped_with_min_max_thresholds_config = + type grouped_with_metered_minimum_config = { grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + minimum_unit_amount: String, + pricing_key: String, + scaling_factors: ::Array[Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], + scaling_key: String, + unit_amounts: ::Array[Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] } - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel attr_accessor grouping_key: String - attr_accessor maximum_charge: String + attr_accessor minimum_unit_amount: String - attr_accessor minimum_charge: String + attr_accessor pricing_key: String - attr_accessor per_unit_rate: String + attr_accessor scaling_factors: ::Array[Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor] + + attr_accessor scaling_key: String + + attr_accessor unit_amounts: ::Array[Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] def initialize: ( grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + minimum_unit_amount: String, + pricing_key: String, + scaling_factors: ::Array[Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], + scaling_key: String, + unit_amounts: ::Array[Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::UnitAmount] ) -> void def to_hash: -> { grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + minimum_unit_amount: String, + pricing_key: String, + scaling_factors: ::Array[Orb::Price::GroupedWithMeteredMinimum::GroupedWithMeteredMinimumConfig::ScalingFactor], + scaling_key: String, + unit_amounts: ::Array[Orb::Price::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 price_type = :usage_price | :fixed_price | :composite_price @@ -6251,7 +6327,7 @@ module Orb FIXED_PRICE: :fixed_price COMPOSITE_PRICE: :composite_price - def self?.values: -> ::Array[Orb::Models::Price::GroupedWithMinMaxThresholds::price_type] + def self?.values: -> ::Array[Orb::Models::Price::GroupedWithMeteredMinimum::price_type] end type license_type = { id: String, grouping_key: String, name: String } @@ -6273,56 +6349,56 @@ module Orb end end - type matrix_with_display_name = + type grouped_with_min_max_thresholds = { id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::MatrixWithDisplayName::billing_mode, - cadence: Orb::Models::Price::MatrixWithDisplayName::cadence, - composite_price_filters: ::Array[Orb::Price::MatrixWithDisplayName::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::GroupedWithMinMaxThresholds::billing_mode, + cadence: Orb::Models::Price::GroupedWithMinMaxThresholds::cadence, + composite_price_filters: ::Array[Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::MatrixWithDisplayName::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, + grouped_with_min_max_thresholds_config: Orb::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, invoice_grouping_key: String?, invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, item: Orb::ItemSlim, - matrix_with_display_name_config: Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig, maximum: Orb::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], minimum: Orb::Minimum?, minimum_amount: String?, - model_type: :matrix_with_display_name, + model_type: :grouped_with_min_max_thresholds, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::MatrixWithDisplayName::price_type, + price_type: Orb::Models::Price::GroupedWithMinMaxThresholds::price_type, replaces_price_id: String?, dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - license_type: Orb::Price::MatrixWithDisplayName::LicenseType? + license_type: Orb::Price::GroupedWithMinMaxThresholds::LicenseType? } - class MatrixWithDisplayName < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel attr_accessor id: String attr_accessor billable_metric: Orb::BillableMetricTiny? attr_accessor billing_cycle_configuration: Orb::BillingCycleConfiguration - attr_accessor billing_mode: Orb::Models::Price::MatrixWithDisplayName::billing_mode + attr_accessor billing_mode: Orb::Models::Price::GroupedWithMinMaxThresholds::billing_mode - attr_accessor cadence: Orb::Models::Price::MatrixWithDisplayName::cadence + attr_accessor cadence: Orb::Models::Price::GroupedWithMinMaxThresholds::cadence - attr_accessor composite_price_filters: ::Array[Orb::Price::MatrixWithDisplayName::CompositePriceFilter]? + attr_accessor composite_price_filters: ::Array[Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter]? attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Price::MatrixWithDisplayName::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Price::GroupedWithMinMaxThresholds::conversion_rate_config? attr_accessor created_at: Time @@ -6336,14 +6412,14 @@ module Orb attr_accessor fixed_price_quantity: Float? + attr_accessor grouped_with_min_max_thresholds_config: Orb::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + attr_accessor invoice_grouping_key: String? attr_accessor invoicing_cycle_configuration: Orb::BillingCycleConfiguration? attr_accessor item: Orb::ItemSlim - attr_accessor matrix_with_display_name_config: Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig - attr_accessor maximum: Orb::Maximum? attr_accessor maximum_amount: String? @@ -6354,39 +6430,39 @@ module Orb attr_accessor minimum_amount: String? - attr_accessor model_type: :matrix_with_display_name + attr_accessor model_type: :grouped_with_min_max_thresholds attr_accessor name: String attr_accessor plan_phase_order: Integer? - attr_accessor price_type: Orb::Models::Price::MatrixWithDisplayName::price_type + attr_accessor price_type: Orb::Models::Price::GroupedWithMinMaxThresholds::price_type attr_accessor replaces_price_id: String? attr_accessor dimensional_price_configuration: Orb::DimensionalPriceConfiguration? - attr_accessor license_type: Orb::Price::MatrixWithDisplayName::LicenseType? + attr_accessor license_type: Orb::Price::GroupedWithMinMaxThresholds::LicenseType? def initialize: ( id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::MatrixWithDisplayName::billing_mode, - cadence: Orb::Models::Price::MatrixWithDisplayName::cadence, - composite_price_filters: ::Array[Orb::Price::MatrixWithDisplayName::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::GroupedWithMinMaxThresholds::billing_mode, + cadence: Orb::Models::Price::GroupedWithMinMaxThresholds::cadence, + composite_price_filters: ::Array[Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::MatrixWithDisplayName::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, + grouped_with_min_max_thresholds_config: Orb::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, invoice_grouping_key: String?, invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, item: Orb::ItemSlim, - matrix_with_display_name_config: Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig, maximum: Orb::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], @@ -6394,44 +6470,44 @@ module Orb minimum_amount: String?, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::MatrixWithDisplayName::price_type, + price_type: Orb::Models::Price::GroupedWithMinMaxThresholds::price_type, replaces_price_id: String?, ?dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - ?license_type: Orb::Price::MatrixWithDisplayName::LicenseType?, - ?model_type: :matrix_with_display_name + ?license_type: Orb::Price::GroupedWithMinMaxThresholds::LicenseType?, + ?model_type: :grouped_with_min_max_thresholds ) -> void def to_hash: -> { id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::MatrixWithDisplayName::billing_mode, - cadence: Orb::Models::Price::MatrixWithDisplayName::cadence, - composite_price_filters: ::Array[Orb::Price::MatrixWithDisplayName::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::GroupedWithMinMaxThresholds::billing_mode, + cadence: Orb::Models::Price::GroupedWithMinMaxThresholds::cadence, + composite_price_filters: ::Array[Orb::Price::GroupedWithMinMaxThresholds::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::MatrixWithDisplayName::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, + grouped_with_min_max_thresholds_config: Orb::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, invoice_grouping_key: String?, invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, item: Orb::ItemSlim, - matrix_with_display_name_config: Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig, maximum: Orb::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], minimum: Orb::Minimum?, minimum_amount: String?, - model_type: :matrix_with_display_name, + model_type: :grouped_with_min_max_thresholds, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::MatrixWithDisplayName::price_type, + price_type: Orb::Models::Price::GroupedWithMinMaxThresholds::price_type, replaces_price_id: String?, dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - license_type: Orb::Price::MatrixWithDisplayName::LicenseType? + license_type: Orb::Price::GroupedWithMinMaxThresholds::LicenseType? } type billing_mode = :in_advance | :in_arrear @@ -6442,7 +6518,7 @@ module Orb IN_ADVANCE: :in_advance IN_ARREAR: :in_arrear - def self?.values: -> ::Array[Orb::Models::Price::MatrixWithDisplayName::billing_mode] + def self?.values: -> ::Array[Orb::Models::Price::GroupedWithMinMaxThresholds::billing_mode] end type cadence = @@ -6458,32 +6534,32 @@ module Orb ANNUAL: :annual CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Price::MatrixWithDisplayName::cadence] + def self?.values: -> ::Array[Orb::Models::Price::GroupedWithMinMaxThresholds::cadence] end type composite_price_filter = { - field: Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter::field, - operator: Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter::operator, + field: Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::field, + operator: Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::operator, values: ::Array[String] } class CompositePriceFilter < Orb::Internal::Type::BaseModel - attr_accessor field: Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter::field + attr_accessor field: Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::field - attr_accessor operator: Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter::operator + attr_accessor operator: Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::operator attr_accessor values: ::Array[String] def initialize: ( - field: Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter::field, - operator: Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter::operator, + field: Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::field, + operator: Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::operator, values: ::Array[String] ) -> void def to_hash: -> { - field: Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter::field, - operator: Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter::operator, + field: Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::field, + operator: Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::operator, values: ::Array[String] } @@ -6499,7 +6575,7 @@ module Orb CURRENCY: :currency PRICING_UNIT_ID: :pricing_unit_id - def self?.values: -> ::Array[Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter::field] + def self?.values: -> ::Array[Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::field] end type operator = :includes | :excludes @@ -6510,57 +6586,40 @@ module Orb INCLUDES: :includes EXCLUDES: :excludes - def self?.values: -> ::Array[Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter::operator] + def self?.values: -> ::Array[Orb::Models::Price::GroupedWithMinMaxThresholds::CompositePriceFilter::operator] end end - type matrix_with_display_name_config = + type grouped_with_min_max_thresholds_config = { - dimension: String, - unit_amounts: ::Array[Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - attr_accessor dimension: String + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + attr_accessor grouping_key: String - attr_accessor unit_amounts: ::Array[Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] + attr_accessor maximum_charge: String + + attr_accessor minimum_charge: String + + attr_accessor per_unit_rate: String def initialize: ( - dimension: String, - unit_amounts: ::Array[Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String ) -> void def to_hash: -> { - dimension: String, - unit_amounts: ::Array[Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] + grouping_key: String, + maximum_charge: String, + minimum_charge: String, + per_unit_rate: String } - - 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 type price_type = :usage_price | :fixed_price | :composite_price @@ -6572,7 +6631,7 @@ module Orb FIXED_PRICE: :fixed_price COMPOSITE_PRICE: :composite_price - def self?.values: -> ::Array[Orb::Models::Price::MatrixWithDisplayName::price_type] + def self?.values: -> ::Array[Orb::Models::Price::GroupedWithMinMaxThresholds::price_type] end type license_type = { id: String, grouping_key: String, name: String } @@ -6594,56 +6653,56 @@ module Orb end end - type grouped_tiered_package = + type matrix_with_display_name = { id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::GroupedTieredPackage::billing_mode, - cadence: Orb::Models::Price::GroupedTieredPackage::cadence, - composite_price_filters: ::Array[Orb::Price::GroupedTieredPackage::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::MatrixWithDisplayName::billing_mode, + cadence: Orb::Models::Price::MatrixWithDisplayName::cadence, + composite_price_filters: ::Array[Orb::Price::MatrixWithDisplayName::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::GroupedTieredPackage::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::MatrixWithDisplayName::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - grouped_tiered_package_config: Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig, invoice_grouping_key: String?, invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, item: Orb::ItemSlim, + matrix_with_display_name_config: Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig, maximum: Orb::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], minimum: Orb::Minimum?, minimum_amount: String?, - model_type: :grouped_tiered_package, + model_type: :matrix_with_display_name, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::GroupedTieredPackage::price_type, + price_type: Orb::Models::Price::MatrixWithDisplayName::price_type, replaces_price_id: String?, dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - license_type: Orb::Price::GroupedTieredPackage::LicenseType? + license_type: Orb::Price::MatrixWithDisplayName::LicenseType? } - class GroupedTieredPackage < Orb::Internal::Type::BaseModel + class MatrixWithDisplayName < Orb::Internal::Type::BaseModel attr_accessor id: String attr_accessor billable_metric: Orb::BillableMetricTiny? attr_accessor billing_cycle_configuration: Orb::BillingCycleConfiguration - attr_accessor billing_mode: Orb::Models::Price::GroupedTieredPackage::billing_mode + attr_accessor billing_mode: Orb::Models::Price::MatrixWithDisplayName::billing_mode - attr_accessor cadence: Orb::Models::Price::GroupedTieredPackage::cadence + attr_accessor cadence: Orb::Models::Price::MatrixWithDisplayName::cadence - attr_accessor composite_price_filters: ::Array[Orb::Price::GroupedTieredPackage::CompositePriceFilter]? + attr_accessor composite_price_filters: ::Array[Orb::Price::MatrixWithDisplayName::CompositePriceFilter]? attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Price::GroupedTieredPackage::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Price::MatrixWithDisplayName::conversion_rate_config? attr_accessor created_at: Time @@ -6657,14 +6716,14 @@ module Orb attr_accessor fixed_price_quantity: Float? - attr_accessor grouped_tiered_package_config: Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig - attr_accessor invoice_grouping_key: String? attr_accessor invoicing_cycle_configuration: Orb::BillingCycleConfiguration? attr_accessor item: Orb::ItemSlim + attr_accessor matrix_with_display_name_config: Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig + attr_accessor maximum: Orb::Maximum? attr_accessor maximum_amount: String? @@ -6675,39 +6734,39 @@ module Orb attr_accessor minimum_amount: String? - attr_accessor model_type: :grouped_tiered_package + attr_accessor model_type: :matrix_with_display_name attr_accessor name: String attr_accessor plan_phase_order: Integer? - attr_accessor price_type: Orb::Models::Price::GroupedTieredPackage::price_type + attr_accessor price_type: Orb::Models::Price::MatrixWithDisplayName::price_type attr_accessor replaces_price_id: String? attr_accessor dimensional_price_configuration: Orb::DimensionalPriceConfiguration? - attr_accessor license_type: Orb::Price::GroupedTieredPackage::LicenseType? + attr_accessor license_type: Orb::Price::MatrixWithDisplayName::LicenseType? def initialize: ( id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::GroupedTieredPackage::billing_mode, - cadence: Orb::Models::Price::GroupedTieredPackage::cadence, - composite_price_filters: ::Array[Orb::Price::GroupedTieredPackage::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::MatrixWithDisplayName::billing_mode, + cadence: Orb::Models::Price::MatrixWithDisplayName::cadence, + composite_price_filters: ::Array[Orb::Price::MatrixWithDisplayName::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::GroupedTieredPackage::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::MatrixWithDisplayName::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - grouped_tiered_package_config: Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig, invoice_grouping_key: String?, invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, item: Orb::ItemSlim, + matrix_with_display_name_config: Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig, maximum: Orb::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], @@ -6715,44 +6774,44 @@ module Orb minimum_amount: String?, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::GroupedTieredPackage::price_type, + price_type: Orb::Models::Price::MatrixWithDisplayName::price_type, replaces_price_id: String?, ?dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - ?license_type: Orb::Price::GroupedTieredPackage::LicenseType?, - ?model_type: :grouped_tiered_package + ?license_type: Orb::Price::MatrixWithDisplayName::LicenseType?, + ?model_type: :matrix_with_display_name ) -> void def to_hash: -> { id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::GroupedTieredPackage::billing_mode, - cadence: Orb::Models::Price::GroupedTieredPackage::cadence, - composite_price_filters: ::Array[Orb::Price::GroupedTieredPackage::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::MatrixWithDisplayName::billing_mode, + cadence: Orb::Models::Price::MatrixWithDisplayName::cadence, + composite_price_filters: ::Array[Orb::Price::MatrixWithDisplayName::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::GroupedTieredPackage::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::MatrixWithDisplayName::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, - grouped_tiered_package_config: Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig, invoice_grouping_key: String?, invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, item: Orb::ItemSlim, + matrix_with_display_name_config: Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig, maximum: Orb::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], minimum: Orb::Minimum?, minimum_amount: String?, - model_type: :grouped_tiered_package, + model_type: :matrix_with_display_name, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::GroupedTieredPackage::price_type, + price_type: Orb::Models::Price::MatrixWithDisplayName::price_type, replaces_price_id: String?, dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - license_type: Orb::Price::GroupedTieredPackage::LicenseType? + license_type: Orb::Price::MatrixWithDisplayName::LicenseType? } type billing_mode = :in_advance | :in_arrear @@ -6763,7 +6822,7 @@ module Orb IN_ADVANCE: :in_advance IN_ARREAR: :in_arrear - def self?.values: -> ::Array[Orb::Models::Price::GroupedTieredPackage::billing_mode] + def self?.values: -> ::Array[Orb::Models::Price::MatrixWithDisplayName::billing_mode] end type cadence = @@ -6779,32 +6838,32 @@ module Orb ANNUAL: :annual CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Price::GroupedTieredPackage::cadence] + def self?.values: -> ::Array[Orb::Models::Price::MatrixWithDisplayName::cadence] end type composite_price_filter = { - field: Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter::field, - operator: Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter::operator, + field: Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter::field, + operator: Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter::operator, values: ::Array[String] } class CompositePriceFilter < Orb::Internal::Type::BaseModel - attr_accessor field: Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter::field + attr_accessor field: Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter::field - attr_accessor operator: Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter::operator + attr_accessor operator: Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter::operator attr_accessor values: ::Array[String] def initialize: ( - field: Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter::field, - operator: Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter::operator, + field: Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter::field, + operator: Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter::operator, values: ::Array[String] ) -> void def to_hash: -> { - field: Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter::field, - operator: Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter::operator, + field: Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter::field, + operator: Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter::operator, values: ::Array[String] } @@ -6820,7 +6879,7 @@ module Orb CURRENCY: :currency PRICING_UNIT_ID: :pricing_unit_id - def self?.values: -> ::Array[Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter::field] + def self?.values: -> ::Array[Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter::field] end type operator = :includes | :excludes @@ -6831,46 +6890,56 @@ module Orb INCLUDES: :includes EXCLUDES: :excludes - def self?.values: -> ::Array[Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter::operator] + def self?.values: -> ::Array[Orb::Models::Price::MatrixWithDisplayName::CompositePriceFilter::operator] end end - type grouped_tiered_package_config = + type matrix_with_display_name_config = { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] + dimension: String, + unit_amounts: ::Array[Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] } - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor package_size: String + class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel + attr_accessor dimension: String - attr_accessor tiers: ::Array[Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] + attr_accessor unit_amounts: ::Array[Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] def initialize: ( - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] + dimension: String, + unit_amounts: ::Array[Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] ) -> void def to_hash: -> { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] + dimension: String, + unit_amounts: ::Array[Orb::Price::MatrixWithDisplayName::MatrixWithDisplayNameConfig::UnitAmount] } - type tier = { per_unit: String, tier_lower_bound: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor per_unit: String + type unit_amount = + { + dimension_value: String, + display_name: String, + unit_amount: String + } - attr_accessor tier_lower_bound: String + class UnitAmount < Orb::Internal::Type::BaseModel + attr_accessor dimension_value: String - def initialize: (per_unit: String, tier_lower_bound: String) -> void + attr_accessor display_name: String - def to_hash: -> { per_unit: String, tier_lower_bound: 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 @@ -6883,7 +6952,7 @@ module Orb FIXED_PRICE: :fixed_price COMPOSITE_PRICE: :composite_price - def self?.values: -> ::Array[Orb::Models::Price::GroupedTieredPackage::price_type] + def self?.values: -> ::Array[Orb::Models::Price::MatrixWithDisplayName::price_type] end type license_type = { id: String, grouping_key: String, name: String } @@ -6905,56 +6974,56 @@ module Orb end end - type max_group_tiered_package = + type grouped_tiered_package = { id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::MaxGroupTieredPackage::billing_mode, - cadence: Orb::Models::Price::MaxGroupTieredPackage::cadence, - composite_price_filters: ::Array[Orb::Price::MaxGroupTieredPackage::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::GroupedTieredPackage::billing_mode, + cadence: Orb::Models::Price::GroupedTieredPackage::cadence, + composite_price_filters: ::Array[Orb::Price::GroupedTieredPackage::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::MaxGroupTieredPackage::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::GroupedTieredPackage::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, + grouped_tiered_package_config: Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig, invoice_grouping_key: String?, invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, item: Orb::ItemSlim, - max_group_tiered_package_config: Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, maximum: Orb::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], minimum: Orb::Minimum?, minimum_amount: String?, - model_type: :max_group_tiered_package, + model_type: :grouped_tiered_package, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::MaxGroupTieredPackage::price_type, + price_type: Orb::Models::Price::GroupedTieredPackage::price_type, replaces_price_id: String?, dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - license_type: Orb::Price::MaxGroupTieredPackage::LicenseType? + license_type: Orb::Price::GroupedTieredPackage::LicenseType? } - class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel + class GroupedTieredPackage < Orb::Internal::Type::BaseModel attr_accessor id: String attr_accessor billable_metric: Orb::BillableMetricTiny? attr_accessor billing_cycle_configuration: Orb::BillingCycleConfiguration - attr_accessor billing_mode: Orb::Models::Price::MaxGroupTieredPackage::billing_mode + attr_accessor billing_mode: Orb::Models::Price::GroupedTieredPackage::billing_mode - attr_accessor cadence: Orb::Models::Price::MaxGroupTieredPackage::cadence + attr_accessor cadence: Orb::Models::Price::GroupedTieredPackage::cadence - attr_accessor composite_price_filters: ::Array[Orb::Price::MaxGroupTieredPackage::CompositePriceFilter]? + attr_accessor composite_price_filters: ::Array[Orb::Price::GroupedTieredPackage::CompositePriceFilter]? attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Price::MaxGroupTieredPackage::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Price::GroupedTieredPackage::conversion_rate_config? attr_accessor created_at: Time @@ -6968,14 +7037,14 @@ module Orb attr_accessor fixed_price_quantity: Float? + attr_accessor grouped_tiered_package_config: Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig + attr_accessor invoice_grouping_key: String? attr_accessor invoicing_cycle_configuration: Orb::BillingCycleConfiguration? attr_accessor item: Orb::ItemSlim - attr_accessor max_group_tiered_package_config: Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig - attr_accessor maximum: Orb::Maximum? attr_accessor maximum_amount: String? @@ -6986,39 +7055,39 @@ module Orb attr_accessor minimum_amount: String? - attr_accessor model_type: :max_group_tiered_package + attr_accessor model_type: :grouped_tiered_package attr_accessor name: String attr_accessor plan_phase_order: Integer? - attr_accessor price_type: Orb::Models::Price::MaxGroupTieredPackage::price_type + attr_accessor price_type: Orb::Models::Price::GroupedTieredPackage::price_type attr_accessor replaces_price_id: String? attr_accessor dimensional_price_configuration: Orb::DimensionalPriceConfiguration? - attr_accessor license_type: Orb::Price::MaxGroupTieredPackage::LicenseType? + attr_accessor license_type: Orb::Price::GroupedTieredPackage::LicenseType? def initialize: ( id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::MaxGroupTieredPackage::billing_mode, - cadence: Orb::Models::Price::MaxGroupTieredPackage::cadence, - composite_price_filters: ::Array[Orb::Price::MaxGroupTieredPackage::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::GroupedTieredPackage::billing_mode, + cadence: Orb::Models::Price::GroupedTieredPackage::cadence, + composite_price_filters: ::Array[Orb::Price::GroupedTieredPackage::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::MaxGroupTieredPackage::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::GroupedTieredPackage::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, + grouped_tiered_package_config: Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig, invoice_grouping_key: String?, invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, item: Orb::ItemSlim, - max_group_tiered_package_config: Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, maximum: Orb::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], @@ -7026,44 +7095,44 @@ module Orb minimum_amount: String?, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::MaxGroupTieredPackage::price_type, + price_type: Orb::Models::Price::GroupedTieredPackage::price_type, replaces_price_id: String?, ?dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - ?license_type: Orb::Price::MaxGroupTieredPackage::LicenseType?, - ?model_type: :max_group_tiered_package + ?license_type: Orb::Price::GroupedTieredPackage::LicenseType?, + ?model_type: :grouped_tiered_package ) -> void def to_hash: -> { id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::MaxGroupTieredPackage::billing_mode, - cadence: Orb::Models::Price::MaxGroupTieredPackage::cadence, - composite_price_filters: ::Array[Orb::Price::MaxGroupTieredPackage::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::GroupedTieredPackage::billing_mode, + cadence: Orb::Models::Price::GroupedTieredPackage::cadence, + composite_price_filters: ::Array[Orb::Price::GroupedTieredPackage::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::MaxGroupTieredPackage::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::GroupedTieredPackage::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, currency: String, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, + grouped_tiered_package_config: Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig, invoice_grouping_key: String?, invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, item: Orb::ItemSlim, - max_group_tiered_package_config: Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, maximum: Orb::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], minimum: Orb::Minimum?, minimum_amount: String?, - model_type: :max_group_tiered_package, + model_type: :grouped_tiered_package, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::MaxGroupTieredPackage::price_type, + price_type: Orb::Models::Price::GroupedTieredPackage::price_type, replaces_price_id: String?, dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - license_type: Orb::Price::MaxGroupTieredPackage::LicenseType? + license_type: Orb::Price::GroupedTieredPackage::LicenseType? } type billing_mode = :in_advance | :in_arrear @@ -7074,7 +7143,7 @@ module Orb IN_ADVANCE: :in_advance IN_ARREAR: :in_arrear - def self?.values: -> ::Array[Orb::Models::Price::MaxGroupTieredPackage::billing_mode] + def self?.values: -> ::Array[Orb::Models::Price::GroupedTieredPackage::billing_mode] end type cadence = @@ -7090,32 +7159,32 @@ module Orb ANNUAL: :annual CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Price::MaxGroupTieredPackage::cadence] + def self?.values: -> ::Array[Orb::Models::Price::GroupedTieredPackage::cadence] end type composite_price_filter = { - field: Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter::field, - operator: Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter::operator, + field: Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter::field, + operator: Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter::operator, values: ::Array[String] } class CompositePriceFilter < Orb::Internal::Type::BaseModel - attr_accessor field: Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter::field + attr_accessor field: Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter::field - attr_accessor operator: Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter::operator + attr_accessor operator: Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter::operator attr_accessor values: ::Array[String] def initialize: ( - field: Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter::field, - operator: Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter::operator, + field: Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter::field, + operator: Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter::operator, values: ::Array[String] ) -> void def to_hash: -> { - field: Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter::field, - operator: Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter::operator, + field: Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter::field, + operator: Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter::operator, values: ::Array[String] } @@ -7131,7 +7200,7 @@ module Orb CURRENCY: :currency PRICING_UNIT_ID: :pricing_unit_id - def self?.values: -> ::Array[Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter::field] + def self?.values: -> ::Array[Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter::field] end type operator = :includes | :excludes @@ -7142,49 +7211,46 @@ module Orb INCLUDES: :includes EXCLUDES: :excludes - def self?.values: -> ::Array[Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter::operator] + def self?.values: -> ::Array[Orb::Models::Price::GroupedTieredPackage::CompositePriceFilter::operator] end end - type max_group_tiered_package_config = + type grouped_tiered_package_config = { grouping_key: String, package_size: String, - tiers: ::Array[Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] + tiers: ::Array[Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] } - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel + class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel attr_accessor grouping_key: String attr_accessor package_size: String - attr_accessor tiers: ::Array[Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] + attr_accessor tiers: ::Array[Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] def initialize: ( grouping_key: String, package_size: String, - tiers: ::Array[Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] + tiers: ::Array[Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] ) -> void def to_hash: -> { grouping_key: String, package_size: String, - tiers: ::Array[Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] + tiers: ::Array[Orb::Price::GroupedTieredPackage::GroupedTieredPackageConfig::Tier] } - type tier = { tier_lower_bound: String, unit_amount: String } + type tier = { per_unit: String, tier_lower_bound: String } class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String + attr_accessor per_unit: String - attr_accessor unit_amount: String + attr_accessor tier_lower_bound: String - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void + def initialize: (per_unit: String, tier_lower_bound: String) -> void - def to_hash: -> { tier_lower_bound: String, unit_amount: String } + def to_hash: -> { per_unit: String, tier_lower_bound: String } end end @@ -7197,7 +7263,7 @@ module Orb FIXED_PRICE: :fixed_price COMPOSITE_PRICE: :composite_price - def self?.values: -> ::Array[Orb::Models::Price::MaxGroupTieredPackage::price_type] + def self?.values: -> ::Array[Orb::Models::Price::GroupedTieredPackage::price_type] end type license_type = { id: String, grouping_key: String, name: String } @@ -7219,18 +7285,1020 @@ module Orb end end - type scalable_matrix_with_unit_pricing = + type max_group_tiered_package = { id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::ScalableMatrixWithUnitPricing::billing_mode, - cadence: Orb::Models::Price::ScalableMatrixWithUnitPricing::cadence, - composite_price_filters: ::Array[Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::MaxGroupTieredPackage::billing_mode, + cadence: Orb::Models::Price::MaxGroupTieredPackage::cadence, + composite_price_filters: ::Array[Orb::Price::MaxGroupTieredPackage::CompositePriceFilter]?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Price::MaxGroupTieredPackage::conversion_rate_config?, + created_at: Time, + credit_allocation: Orb::Allocation?, + currency: String, + discount: Orb::Models::discount?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, + item: Orb::ItemSlim, + max_group_tiered_package_config: Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, + maximum: Orb::Maximum?, + maximum_amount: String?, + metadata: ::Hash[Symbol, String], + minimum: Orb::Minimum?, + minimum_amount: String?, + model_type: :max_group_tiered_package, + name: String, + plan_phase_order: Integer?, + price_type: Orb::Models::Price::MaxGroupTieredPackage::price_type, + replaces_price_id: String?, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, + license_type: Orb::Price::MaxGroupTieredPackage::LicenseType? + } + + class MaxGroupTieredPackage < Orb::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor billable_metric: Orb::BillableMetricTiny? + + attr_accessor billing_cycle_configuration: Orb::BillingCycleConfiguration + + attr_accessor billing_mode: Orb::Models::Price::MaxGroupTieredPackage::billing_mode + + attr_accessor cadence: Orb::Models::Price::MaxGroupTieredPackage::cadence + + attr_accessor composite_price_filters: ::Array[Orb::Price::MaxGroupTieredPackage::CompositePriceFilter]? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::Price::MaxGroupTieredPackage::conversion_rate_config? + + attr_accessor created_at: Time + + attr_accessor credit_allocation: Orb::Allocation? + + attr_accessor currency: String + + attr_accessor discount: Orb::Models::discount? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::BillingCycleConfiguration? + + attr_accessor item: Orb::ItemSlim + + attr_accessor max_group_tiered_package_config: Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig + + attr_accessor maximum: Orb::Maximum? + + attr_accessor maximum_amount: String? + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor minimum: Orb::Minimum? + + attr_accessor minimum_amount: String? + + attr_accessor model_type: :max_group_tiered_package + + attr_accessor name: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor price_type: Orb::Models::Price::MaxGroupTieredPackage::price_type + + attr_accessor replaces_price_id: String? + + attr_accessor dimensional_price_configuration: Orb::DimensionalPriceConfiguration? + + attr_accessor license_type: Orb::Price::MaxGroupTieredPackage::LicenseType? + + def initialize: ( + id: String, + billable_metric: Orb::BillableMetricTiny?, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Models::Price::MaxGroupTieredPackage::billing_mode, + cadence: Orb::Models::Price::MaxGroupTieredPackage::cadence, + composite_price_filters: ::Array[Orb::Price::MaxGroupTieredPackage::CompositePriceFilter]?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Price::MaxGroupTieredPackage::conversion_rate_config?, + created_at: Time, + credit_allocation: Orb::Allocation?, + currency: String, + discount: Orb::Models::discount?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, + item: Orb::ItemSlim, + max_group_tiered_package_config: Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, + maximum: Orb::Maximum?, + maximum_amount: String?, + metadata: ::Hash[Symbol, String], + minimum: Orb::Minimum?, + minimum_amount: String?, + name: String, + plan_phase_order: Integer?, + price_type: Orb::Models::Price::MaxGroupTieredPackage::price_type, + replaces_price_id: String?, + ?dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, + ?license_type: Orb::Price::MaxGroupTieredPackage::LicenseType?, + ?model_type: :max_group_tiered_package + ) -> void + + def to_hash: -> { + id: String, + billable_metric: Orb::BillableMetricTiny?, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Models::Price::MaxGroupTieredPackage::billing_mode, + cadence: Orb::Models::Price::MaxGroupTieredPackage::cadence, + composite_price_filters: ::Array[Orb::Price::MaxGroupTieredPackage::CompositePriceFilter]?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Price::MaxGroupTieredPackage::conversion_rate_config?, + created_at: Time, + credit_allocation: Orb::Allocation?, + currency: String, + discount: Orb::Models::discount?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, + item: Orb::ItemSlim, + max_group_tiered_package_config: Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig, + maximum: Orb::Maximum?, + maximum_amount: String?, + metadata: ::Hash[Symbol, String], + minimum: Orb::Minimum?, + minimum_amount: String?, + model_type: :max_group_tiered_package, + name: String, + plan_phase_order: Integer?, + price_type: Orb::Models::Price::MaxGroupTieredPackage::price_type, + replaces_price_id: String?, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, + license_type: Orb::Price::MaxGroupTieredPackage::LicenseType? + } + + type billing_mode = :in_advance | :in_arrear + + module BillingMode + extend Orb::Internal::Type::Enum + + IN_ADVANCE: :in_advance + IN_ARREAR: :in_arrear + + def self?.values: -> ::Array[Orb::Models::Price::MaxGroupTieredPackage::billing_mode] + end + + type cadence = + :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ONE_TIME: :one_time + MONTHLY: :monthly + QUARTERLY: :quarterly + SEMI_ANNUAL: :semi_annual + ANNUAL: :annual + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::Price::MaxGroupTieredPackage::cadence] + end + + type composite_price_filter = + { + field: Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter::field, + operator: Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter::operator, + values: ::Array[String] + } + + class CompositePriceFilter < Orb::Internal::Type::BaseModel + attr_accessor field: Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter::field + + attr_accessor operator: Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter::operator + + attr_accessor values: ::Array[String] + + def initialize: ( + field: Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter::field, + operator: Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter::operator, + values: ::Array[String] + ) -> void + + def to_hash: -> { + field: Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter::field, + operator: Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter::operator, + values: ::Array[String] + } + + type field = + :price_id | :item_id | :price_type | :currency | :pricing_unit_id + + module Field + extend Orb::Internal::Type::Enum + + PRICE_ID: :price_id + ITEM_ID: :item_id + PRICE_TYPE: :price_type + CURRENCY: :currency + PRICING_UNIT_ID: :pricing_unit_id + + def self?.values: -> ::Array[Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter::field] + end + + type operator = :includes | :excludes + + module Operator + extend Orb::Internal::Type::Enum + + INCLUDES: :includes + EXCLUDES: :excludes + + def self?.values: -> ::Array[Orb::Models::Price::MaxGroupTieredPackage::CompositePriceFilter::operator] + end + end + + type max_group_tiered_package_config = + { + grouping_key: String, + package_size: String, + tiers: ::Array[Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] + } + + class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel + attr_accessor grouping_key: String + + attr_accessor package_size: String + + attr_accessor tiers: ::Array[Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] + + def initialize: ( + grouping_key: String, + package_size: String, + tiers: ::Array[Orb::Price::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] + ) -> void + + def to_hash: -> { + grouping_key: String, + package_size: String, + tiers: ::Array[Orb::Price::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 + + type price_type = :usage_price | :fixed_price | :composite_price + + module PriceType + extend Orb::Internal::Type::Enum + + USAGE_PRICE: :usage_price + FIXED_PRICE: :fixed_price + COMPOSITE_PRICE: :composite_price + + def self?.values: -> ::Array[Orb::Models::Price::MaxGroupTieredPackage::price_type] + end + + type license_type = { id: String, grouping_key: String, name: String } + + class LicenseType < Orb::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor grouping_key: String + + attr_accessor name: String + + def initialize: ( + id: String, + grouping_key: String, + name: String + ) -> void + + def to_hash: -> { id: String, grouping_key: String, name: String } + end + end + + type scalable_matrix_with_unit_pricing = + { + id: String, + billable_metric: Orb::BillableMetricTiny?, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Models::Price::ScalableMatrixWithUnitPricing::billing_mode, + cadence: Orb::Models::Price::ScalableMatrixWithUnitPricing::cadence, + composite_price_filters: ::Array[Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter]?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Price::ScalableMatrixWithUnitPricing::conversion_rate_config?, + created_at: Time, + credit_allocation: Orb::Allocation?, + currency: String, + discount: Orb::Models::discount?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, + item: Orb::ItemSlim, + maximum: Orb::Maximum?, + maximum_amount: String?, + metadata: ::Hash[Symbol, String], + minimum: Orb::Minimum?, + minimum_amount: String?, + model_type: :scalable_matrix_with_unit_pricing, + name: String, + plan_phase_order: Integer?, + price_type: Orb::Models::Price::ScalableMatrixWithUnitPricing::price_type, + replaces_price_id: String?, + scalable_matrix_with_unit_pricing_config: Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, + license_type: Orb::Price::ScalableMatrixWithUnitPricing::LicenseType? + } + + class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor billable_metric: Orb::BillableMetricTiny? + + attr_accessor billing_cycle_configuration: Orb::BillingCycleConfiguration + + attr_accessor billing_mode: Orb::Models::Price::ScalableMatrixWithUnitPricing::billing_mode + + attr_accessor cadence: Orb::Models::Price::ScalableMatrixWithUnitPricing::cadence + + attr_accessor composite_price_filters: ::Array[Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter]? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::Price::ScalableMatrixWithUnitPricing::conversion_rate_config? + + attr_accessor created_at: Time + + attr_accessor credit_allocation: Orb::Allocation? + + attr_accessor currency: String + + attr_accessor discount: Orb::Models::discount? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::BillingCycleConfiguration? + + attr_accessor item: Orb::ItemSlim + + attr_accessor maximum: Orb::Maximum? + + attr_accessor maximum_amount: String? + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor minimum: Orb::Minimum? + + attr_accessor minimum_amount: String? + + attr_accessor model_type: :scalable_matrix_with_unit_pricing + + attr_accessor name: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor price_type: Orb::Models::Price::ScalableMatrixWithUnitPricing::price_type + + attr_accessor replaces_price_id: String? + + attr_accessor scalable_matrix_with_unit_pricing_config: Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig + + attr_accessor dimensional_price_configuration: Orb::DimensionalPriceConfiguration? + + attr_accessor license_type: Orb::Price::ScalableMatrixWithUnitPricing::LicenseType? + + def initialize: ( + id: String, + billable_metric: Orb::BillableMetricTiny?, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Models::Price::ScalableMatrixWithUnitPricing::billing_mode, + cadence: Orb::Models::Price::ScalableMatrixWithUnitPricing::cadence, + composite_price_filters: ::Array[Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter]?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Price::ScalableMatrixWithUnitPricing::conversion_rate_config?, + created_at: Time, + credit_allocation: Orb::Allocation?, + currency: String, + discount: Orb::Models::discount?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, + item: Orb::ItemSlim, + maximum: Orb::Maximum?, + maximum_amount: String?, + metadata: ::Hash[Symbol, String], + minimum: Orb::Minimum?, + minimum_amount: String?, + name: String, + plan_phase_order: Integer?, + price_type: Orb::Models::Price::ScalableMatrixWithUnitPricing::price_type, + replaces_price_id: String?, + scalable_matrix_with_unit_pricing_config: Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, + ?dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, + ?license_type: Orb::Price::ScalableMatrixWithUnitPricing::LicenseType?, + ?model_type: :scalable_matrix_with_unit_pricing + ) -> void + + def to_hash: -> { + id: String, + billable_metric: Orb::BillableMetricTiny?, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Models::Price::ScalableMatrixWithUnitPricing::billing_mode, + cadence: Orb::Models::Price::ScalableMatrixWithUnitPricing::cadence, + composite_price_filters: ::Array[Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter]?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Price::ScalableMatrixWithUnitPricing::conversion_rate_config?, + created_at: Time, + credit_allocation: Orb::Allocation?, + currency: String, + discount: Orb::Models::discount?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, + item: Orb::ItemSlim, + maximum: Orb::Maximum?, + maximum_amount: String?, + metadata: ::Hash[Symbol, String], + minimum: Orb::Minimum?, + minimum_amount: String?, + model_type: :scalable_matrix_with_unit_pricing, + name: String, + plan_phase_order: Integer?, + price_type: Orb::Models::Price::ScalableMatrixWithUnitPricing::price_type, + replaces_price_id: String?, + scalable_matrix_with_unit_pricing_config: Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, + license_type: Orb::Price::ScalableMatrixWithUnitPricing::LicenseType? + } + + type billing_mode = :in_advance | :in_arrear + + module BillingMode + extend Orb::Internal::Type::Enum + + IN_ADVANCE: :in_advance + IN_ARREAR: :in_arrear + + def self?.values: -> ::Array[Orb::Models::Price::ScalableMatrixWithUnitPricing::billing_mode] + end + + type cadence = + :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ONE_TIME: :one_time + MONTHLY: :monthly + QUARTERLY: :quarterly + SEMI_ANNUAL: :semi_annual + ANNUAL: :annual + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::Price::ScalableMatrixWithUnitPricing::cadence] + end + + type composite_price_filter = + { + field: Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::field, + operator: Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::operator, + values: ::Array[String] + } + + class CompositePriceFilter < Orb::Internal::Type::BaseModel + attr_accessor field: Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::field + + attr_accessor operator: Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::operator + + attr_accessor values: ::Array[String] + + def initialize: ( + field: Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::field, + operator: Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::operator, + values: ::Array[String] + ) -> void + + def to_hash: -> { + field: Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::field, + operator: Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::operator, + values: ::Array[String] + } + + type field = + :price_id | :item_id | :price_type | :currency | :pricing_unit_id + + module Field + extend Orb::Internal::Type::Enum + + PRICE_ID: :price_id + ITEM_ID: :item_id + PRICE_TYPE: :price_type + CURRENCY: :currency + PRICING_UNIT_ID: :pricing_unit_id + + def self?.values: -> ::Array[Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::field] + end + + type operator = :includes | :excludes + + module Operator + extend Orb::Internal::Type::Enum + + INCLUDES: :includes + EXCLUDES: :excludes + + def self?.values: -> ::Array[Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::operator] + end + end + + type price_type = :usage_price | :fixed_price | :composite_price + + module PriceType + extend Orb::Internal::Type::Enum + + USAGE_PRICE: :usage_price + FIXED_PRICE: :fixed_price + COMPOSITE_PRICE: :composite_price + + def self?.values: -> ::Array[Orb::Models::Price::ScalableMatrixWithUnitPricing::price_type] + end + + type scalable_matrix_with_unit_pricing_config = + { + first_dimension: String, + matrix_scaling_factors: ::Array[Orb::Price::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::Price::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::Price::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::Price::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 + + type license_type = { id: String, grouping_key: String, name: String } + + class LicenseType < Orb::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor grouping_key: String + + attr_accessor name: String + + def initialize: ( + id: String, + grouping_key: String, + name: String + ) -> void + + def to_hash: -> { id: String, grouping_key: String, name: String } + end + end + + type scalable_matrix_with_tiered_pricing = + { + id: String, + billable_metric: Orb::BillableMetricTiny?, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Models::Price::ScalableMatrixWithTieredPricing::billing_mode, + cadence: Orb::Models::Price::ScalableMatrixWithTieredPricing::cadence, + composite_price_filters: ::Array[Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter]?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Price::ScalableMatrixWithTieredPricing::conversion_rate_config?, + created_at: Time, + credit_allocation: Orb::Allocation?, + currency: String, + discount: Orb::Models::discount?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, + item: Orb::ItemSlim, + maximum: Orb::Maximum?, + maximum_amount: String?, + metadata: ::Hash[Symbol, String], + minimum: Orb::Minimum?, + minimum_amount: String?, + model_type: :scalable_matrix_with_tiered_pricing, + name: String, + plan_phase_order: Integer?, + price_type: Orb::Models::Price::ScalableMatrixWithTieredPricing::price_type, + replaces_price_id: String?, + scalable_matrix_with_tiered_pricing_config: Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, + license_type: Orb::Price::ScalableMatrixWithTieredPricing::LicenseType? + } + + class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor billable_metric: Orb::BillableMetricTiny? + + attr_accessor billing_cycle_configuration: Orb::BillingCycleConfiguration + + attr_accessor billing_mode: Orb::Models::Price::ScalableMatrixWithTieredPricing::billing_mode + + attr_accessor cadence: Orb::Models::Price::ScalableMatrixWithTieredPricing::cadence + + attr_accessor composite_price_filters: ::Array[Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter]? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::Price::ScalableMatrixWithTieredPricing::conversion_rate_config? + + attr_accessor created_at: Time + + attr_accessor credit_allocation: Orb::Allocation? + + attr_accessor currency: String + + attr_accessor discount: Orb::Models::discount? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::BillingCycleConfiguration? + + attr_accessor item: Orb::ItemSlim + + attr_accessor maximum: Orb::Maximum? + + attr_accessor maximum_amount: String? + + attr_accessor metadata: ::Hash[Symbol, String] + + attr_accessor minimum: Orb::Minimum? + + attr_accessor minimum_amount: String? + + attr_accessor model_type: :scalable_matrix_with_tiered_pricing + + attr_accessor name: String + + attr_accessor plan_phase_order: Integer? + + attr_accessor price_type: Orb::Models::Price::ScalableMatrixWithTieredPricing::price_type + + attr_accessor replaces_price_id: String? + + attr_accessor scalable_matrix_with_tiered_pricing_config: Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig + + attr_accessor dimensional_price_configuration: Orb::DimensionalPriceConfiguration? + + attr_accessor license_type: Orb::Price::ScalableMatrixWithTieredPricing::LicenseType? + + def initialize: ( + id: String, + billable_metric: Orb::BillableMetricTiny?, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Models::Price::ScalableMatrixWithTieredPricing::billing_mode, + cadence: Orb::Models::Price::ScalableMatrixWithTieredPricing::cadence, + composite_price_filters: ::Array[Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter]?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Price::ScalableMatrixWithTieredPricing::conversion_rate_config?, + created_at: Time, + credit_allocation: Orb::Allocation?, + currency: String, + discount: Orb::Models::discount?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, + item: Orb::ItemSlim, + maximum: Orb::Maximum?, + maximum_amount: String?, + metadata: ::Hash[Symbol, String], + minimum: Orb::Minimum?, + minimum_amount: String?, + name: String, + plan_phase_order: Integer?, + price_type: Orb::Models::Price::ScalableMatrixWithTieredPricing::price_type, + replaces_price_id: String?, + scalable_matrix_with_tiered_pricing_config: Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, + ?dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, + ?license_type: Orb::Price::ScalableMatrixWithTieredPricing::LicenseType?, + ?model_type: :scalable_matrix_with_tiered_pricing + ) -> void + + def to_hash: -> { + id: String, + billable_metric: Orb::BillableMetricTiny?, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Models::Price::ScalableMatrixWithTieredPricing::billing_mode, + cadence: Orb::Models::Price::ScalableMatrixWithTieredPricing::cadence, + composite_price_filters: ::Array[Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter]?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::Price::ScalableMatrixWithTieredPricing::conversion_rate_config?, + created_at: Time, + credit_allocation: Orb::Allocation?, + currency: String, + discount: Orb::Models::discount?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration?, + item: Orb::ItemSlim, + maximum: Orb::Maximum?, + maximum_amount: String?, + metadata: ::Hash[Symbol, String], + minimum: Orb::Minimum?, + minimum_amount: String?, + model_type: :scalable_matrix_with_tiered_pricing, + name: String, + plan_phase_order: Integer?, + price_type: Orb::Models::Price::ScalableMatrixWithTieredPricing::price_type, + replaces_price_id: String?, + scalable_matrix_with_tiered_pricing_config: Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, + license_type: Orb::Price::ScalableMatrixWithTieredPricing::LicenseType? + } + + type billing_mode = :in_advance | :in_arrear + + module BillingMode + extend Orb::Internal::Type::Enum + + IN_ADVANCE: :in_advance + IN_ARREAR: :in_arrear + + def self?.values: -> ::Array[Orb::Models::Price::ScalableMatrixWithTieredPricing::billing_mode] + end + + type cadence = + :one_time | :monthly | :quarterly | :semi_annual | :annual | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ONE_TIME: :one_time + MONTHLY: :monthly + QUARTERLY: :quarterly + SEMI_ANNUAL: :semi_annual + ANNUAL: :annual + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::Price::ScalableMatrixWithTieredPricing::cadence] + end + + type composite_price_filter = + { + field: Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::field, + operator: Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::operator, + values: ::Array[String] + } + + class CompositePriceFilter < Orb::Internal::Type::BaseModel + attr_accessor field: Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::field + + attr_accessor operator: Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::operator + + attr_accessor values: ::Array[String] + + def initialize: ( + field: Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::field, + operator: Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::operator, + values: ::Array[String] + ) -> void + + def to_hash: -> { + field: Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::field, + operator: Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::operator, + values: ::Array[String] + } + + type field = + :price_id | :item_id | :price_type | :currency | :pricing_unit_id + + module Field + extend Orb::Internal::Type::Enum + + PRICE_ID: :price_id + ITEM_ID: :item_id + PRICE_TYPE: :price_type + CURRENCY: :currency + PRICING_UNIT_ID: :pricing_unit_id + + def self?.values: -> ::Array[Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::field] + end + + type operator = :includes | :excludes + + module Operator + extend Orb::Internal::Type::Enum + + INCLUDES: :includes + EXCLUDES: :excludes + + def self?.values: -> ::Array[Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::operator] + end + end + + type price_type = :usage_price | :fixed_price | :composite_price + + module PriceType + extend Orb::Internal::Type::Enum + + USAGE_PRICE: :usage_price + FIXED_PRICE: :fixed_price + COMPOSITE_PRICE: :composite_price + + def self?.values: -> ::Array[Orb::Models::Price::ScalableMatrixWithTieredPricing::price_type] + end + + type scalable_matrix_with_tiered_pricing_config = + { + first_dimension: String, + matrix_scaling_factors: ::Array[Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], + tiers: ::Array[Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], + second_dimension: String? + } + + class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel + attr_accessor first_dimension: String + + attr_accessor matrix_scaling_factors: ::Array[Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor] + + attr_accessor tiers: ::Array[Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier] + + attr_accessor second_dimension: String? + + def initialize: ( + first_dimension: String, + matrix_scaling_factors: ::Array[Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], + tiers: ::Array[Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], + ?second_dimension: String? + ) -> void + + def to_hash: -> { + first_dimension: String, + matrix_scaling_factors: ::Array[Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], + tiers: ::Array[Orb::Price::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 + + type license_type = { id: String, grouping_key: String, name: String } + + class LicenseType < Orb::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor grouping_key: String + + attr_accessor name: String + + def initialize: ( + id: String, + grouping_key: String, + name: String + ) -> void + + def to_hash: -> { id: String, grouping_key: String, name: String } + end + end + + type cumulative_grouped_bulk = + { + id: String, + billable_metric: Orb::BillableMetricTiny?, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Models::Price::CumulativeGroupedBulk::billing_mode, + cadence: Orb::Models::Price::CumulativeGroupedBulk::cadence, + composite_price_filters: ::Array[Orb::Price::CumulativeGroupedBulk::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::ScalableMatrixWithUnitPricing::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::CumulativeGroupedBulk::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, + cumulative_grouped_bulk_config: Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, currency: String, discount: Orb::Models::discount?, external_price_id: String?, @@ -7243,37 +8311,38 @@ module Orb metadata: ::Hash[Symbol, String], minimum: Orb::Minimum?, minimum_amount: String?, - model_type: :scalable_matrix_with_unit_pricing, + model_type: :cumulative_grouped_bulk, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::ScalableMatrixWithUnitPricing::price_type, + price_type: Orb::Models::Price::CumulativeGroupedBulk::price_type, replaces_price_id: String?, - scalable_matrix_with_unit_pricing_config: Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - license_type: Orb::Price::ScalableMatrixWithUnitPricing::LicenseType? + license_type: Orb::Price::CumulativeGroupedBulk::LicenseType? } - class ScalableMatrixWithUnitPricing < Orb::Internal::Type::BaseModel + class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel attr_accessor id: String attr_accessor billable_metric: Orb::BillableMetricTiny? attr_accessor billing_cycle_configuration: Orb::BillingCycleConfiguration - attr_accessor billing_mode: Orb::Models::Price::ScalableMatrixWithUnitPricing::billing_mode + attr_accessor billing_mode: Orb::Models::Price::CumulativeGroupedBulk::billing_mode - attr_accessor cadence: Orb::Models::Price::ScalableMatrixWithUnitPricing::cadence + attr_accessor cadence: Orb::Models::Price::CumulativeGroupedBulk::cadence - attr_accessor composite_price_filters: ::Array[Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter]? + attr_accessor composite_price_filters: ::Array[Orb::Price::CumulativeGroupedBulk::CompositePriceFilter]? attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Price::ScalableMatrixWithUnitPricing::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Price::CumulativeGroupedBulk::conversion_rate_config? attr_accessor created_at: Time attr_accessor credit_allocation: Orb::Allocation? + attr_accessor cumulative_grouped_bulk_config: Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig + attr_accessor currency: String attr_accessor discount: Orb::Models::discount? @@ -7298,33 +8367,32 @@ module Orb attr_accessor minimum_amount: String? - attr_accessor model_type: :scalable_matrix_with_unit_pricing + attr_accessor model_type: :cumulative_grouped_bulk attr_accessor name: String attr_accessor plan_phase_order: Integer? - attr_accessor price_type: Orb::Models::Price::ScalableMatrixWithUnitPricing::price_type + attr_accessor price_type: Orb::Models::Price::CumulativeGroupedBulk::price_type attr_accessor replaces_price_id: String? - attr_accessor scalable_matrix_with_unit_pricing_config: Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig - attr_accessor dimensional_price_configuration: Orb::DimensionalPriceConfiguration? - attr_accessor license_type: Orb::Price::ScalableMatrixWithUnitPricing::LicenseType? + attr_accessor license_type: Orb::Price::CumulativeGroupedBulk::LicenseType? def initialize: ( id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::ScalableMatrixWithUnitPricing::billing_mode, - cadence: Orb::Models::Price::ScalableMatrixWithUnitPricing::cadence, - composite_price_filters: ::Array[Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::CumulativeGroupedBulk::billing_mode, + cadence: Orb::Models::Price::CumulativeGroupedBulk::cadence, + composite_price_filters: ::Array[Orb::Price::CumulativeGroupedBulk::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::ScalableMatrixWithUnitPricing::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::CumulativeGroupedBulk::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, + cumulative_grouped_bulk_config: Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, currency: String, discount: Orb::Models::discount?, external_price_id: String?, @@ -7339,25 +8407,25 @@ module Orb minimum_amount: String?, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::ScalableMatrixWithUnitPricing::price_type, + price_type: Orb::Models::Price::CumulativeGroupedBulk::price_type, replaces_price_id: String?, - scalable_matrix_with_unit_pricing_config: Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, ?dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - ?license_type: Orb::Price::ScalableMatrixWithUnitPricing::LicenseType?, - ?model_type: :scalable_matrix_with_unit_pricing + ?license_type: Orb::Price::CumulativeGroupedBulk::LicenseType?, + ?model_type: :cumulative_grouped_bulk ) -> void def to_hash: -> { id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::ScalableMatrixWithUnitPricing::billing_mode, - cadence: Orb::Models::Price::ScalableMatrixWithUnitPricing::cadence, - composite_price_filters: ::Array[Orb::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::CumulativeGroupedBulk::billing_mode, + cadence: Orb::Models::Price::CumulativeGroupedBulk::cadence, + composite_price_filters: ::Array[Orb::Price::CumulativeGroupedBulk::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::ScalableMatrixWithUnitPricing::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::CumulativeGroupedBulk::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, + cumulative_grouped_bulk_config: Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, currency: String, discount: Orb::Models::discount?, external_price_id: String?, @@ -7370,14 +8438,13 @@ module Orb metadata: ::Hash[Symbol, String], minimum: Orb::Minimum?, minimum_amount: String?, - model_type: :scalable_matrix_with_unit_pricing, + model_type: :cumulative_grouped_bulk, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::ScalableMatrixWithUnitPricing::price_type, + price_type: Orb::Models::Price::CumulativeGroupedBulk::price_type, replaces_price_id: String?, - scalable_matrix_with_unit_pricing_config: Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig, dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - license_type: Orb::Price::ScalableMatrixWithUnitPricing::LicenseType? + license_type: Orb::Price::CumulativeGroupedBulk::LicenseType? } type billing_mode = :in_advance | :in_arrear @@ -7388,7 +8455,7 @@ module Orb IN_ADVANCE: :in_advance IN_ARREAR: :in_arrear - def self?.values: -> ::Array[Orb::Models::Price::ScalableMatrixWithUnitPricing::billing_mode] + def self?.values: -> ::Array[Orb::Models::Price::CumulativeGroupedBulk::billing_mode] end type cadence = @@ -7404,32 +8471,32 @@ module Orb ANNUAL: :annual CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Price::ScalableMatrixWithUnitPricing::cadence] + def self?.values: -> ::Array[Orb::Models::Price::CumulativeGroupedBulk::cadence] end type composite_price_filter = { - field: Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::field, - operator: Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::operator, + field: Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter::field, + operator: Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter::operator, values: ::Array[String] } class CompositePriceFilter < Orb::Internal::Type::BaseModel - attr_accessor field: Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::field + attr_accessor field: Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter::field - attr_accessor operator: Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::operator + attr_accessor operator: Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter::operator attr_accessor values: ::Array[String] def initialize: ( - field: Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::field, - operator: Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::operator, + field: Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter::field, + operator: Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter::operator, values: ::Array[String] ) -> void def to_hash: -> { - field: Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::field, - operator: Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::operator, + field: Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter::field, + operator: Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter::operator, values: ::Array[String] } @@ -7445,7 +8512,7 @@ module Orb CURRENCY: :currency PRICING_UNIT_ID: :pricing_unit_id - def self?.values: -> ::Array[Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::field] + def self?.values: -> ::Array[Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter::field] end type operator = :includes | :excludes @@ -7456,91 +8523,71 @@ module Orb INCLUDES: :includes EXCLUDES: :excludes - def self?.values: -> ::Array[Orb::Models::Price::ScalableMatrixWithUnitPricing::CompositePriceFilter::operator] + def self?.values: -> ::Array[Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter::operator] end end - type price_type = :usage_price | :fixed_price | :composite_price - - module PriceType - extend Orb::Internal::Type::Enum - - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - COMPOSITE_PRICE: :composite_price - - def self?.values: -> ::Array[Orb::Models::Price::ScalableMatrixWithUnitPricing::price_type] - end - - type scalable_matrix_with_unit_pricing_config = + type cumulative_grouped_bulk_config = { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - grouping_key: String?, - prorate: bool?, - second_dimension: String? + dimension_values: ::Array[Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], + group: String } - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - attr_accessor first_dimension: String - - attr_accessor matrix_scaling_factors: ::Array[Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor] - - attr_accessor unit_price: String - - attr_accessor grouping_key: String? - - attr_accessor prorate: bool? + class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue] - attr_accessor second_dimension: String? + attr_accessor group: String def initialize: ( - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - ?grouping_key: String?, - ?prorate: bool?, - ?second_dimension: String? + dimension_values: ::Array[Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], + group: String ) -> void def to_hash: -> { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Price::ScalableMatrixWithUnitPricing::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - grouping_key: String?, - prorate: bool?, - second_dimension: String? + dimension_values: ::Array[Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], + group: String } - type matrix_scaling_factor = + type dimension_value = { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? + grouping_key: String, + tier_lower_bound: String, + unit_amount: String } - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor first_dimension_value: String + class DimensionValue < Orb::Internal::Type::BaseModel + attr_accessor grouping_key: String - attr_accessor scaling_factor: String + attr_accessor tier_lower_bound: String - attr_accessor second_dimension_value: String? + attr_accessor unit_amount: String def initialize: ( - first_dimension_value: String, - scaling_factor: String, - ?second_dimension_value: String? + grouping_key: String, + tier_lower_bound: String, + unit_amount: String ) -> void def to_hash: -> { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? + grouping_key: String, + tier_lower_bound: String, + unit_amount: String } end end + type price_type = :usage_price | :fixed_price | :composite_price + + module PriceType + extend Orb::Internal::Type::Enum + + USAGE_PRICE: :usage_price + FIXED_PRICE: :fixed_price + COMPOSITE_PRICE: :composite_price + + def self?.values: -> ::Array[Orb::Models::Price::CumulativeGroupedBulk::price_type] + end + type license_type = { id: String, grouping_key: String, name: String } class LicenseType < Orb::Internal::Type::BaseModel @@ -7560,18 +8607,19 @@ module Orb end end - type scalable_matrix_with_tiered_pricing = + type cumulative_grouped_allocation = { id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::ScalableMatrixWithTieredPricing::billing_mode, - cadence: Orb::Models::Price::ScalableMatrixWithTieredPricing::cadence, - composite_price_filters: ::Array[Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::CumulativeGroupedAllocation::billing_mode, + cadence: Orb::Models::Price::CumulativeGroupedAllocation::cadence, + composite_price_filters: ::Array[Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::ScalableMatrixWithTieredPricing::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::CumulativeGroupedAllocation::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, + cumulative_grouped_allocation_config: Orb::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, currency: String, discount: Orb::Models::discount?, external_price_id: String?, @@ -7584,37 +8632,38 @@ module Orb metadata: ::Hash[Symbol, String], minimum: Orb::Minimum?, minimum_amount: String?, - model_type: :scalable_matrix_with_tiered_pricing, + model_type: :cumulative_grouped_allocation, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::ScalableMatrixWithTieredPricing::price_type, + price_type: Orb::Models::Price::CumulativeGroupedAllocation::price_type, replaces_price_id: String?, - scalable_matrix_with_tiered_pricing_config: Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - license_type: Orb::Price::ScalableMatrixWithTieredPricing::LicenseType? + license_type: Orb::Price::CumulativeGroupedAllocation::LicenseType? } - class ScalableMatrixWithTieredPricing < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel attr_accessor id: String attr_accessor billable_metric: Orb::BillableMetricTiny? attr_accessor billing_cycle_configuration: Orb::BillingCycleConfiguration - attr_accessor billing_mode: Orb::Models::Price::ScalableMatrixWithTieredPricing::billing_mode + attr_accessor billing_mode: Orb::Models::Price::CumulativeGroupedAllocation::billing_mode - attr_accessor cadence: Orb::Models::Price::ScalableMatrixWithTieredPricing::cadence + attr_accessor cadence: Orb::Models::Price::CumulativeGroupedAllocation::cadence - attr_accessor composite_price_filters: ::Array[Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter]? + attr_accessor composite_price_filters: ::Array[Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter]? attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Price::ScalableMatrixWithTieredPricing::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Price::CumulativeGroupedAllocation::conversion_rate_config? attr_accessor created_at: Time attr_accessor credit_allocation: Orb::Allocation? + attr_accessor cumulative_grouped_allocation_config: Orb::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + attr_accessor currency: String attr_accessor discount: Orb::Models::discount? @@ -7639,33 +8688,32 @@ module Orb attr_accessor minimum_amount: String? - attr_accessor model_type: :scalable_matrix_with_tiered_pricing + attr_accessor model_type: :cumulative_grouped_allocation attr_accessor name: String attr_accessor plan_phase_order: Integer? - attr_accessor price_type: Orb::Models::Price::ScalableMatrixWithTieredPricing::price_type + attr_accessor price_type: Orb::Models::Price::CumulativeGroupedAllocation::price_type attr_accessor replaces_price_id: String? - attr_accessor scalable_matrix_with_tiered_pricing_config: Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig - attr_accessor dimensional_price_configuration: Orb::DimensionalPriceConfiguration? - attr_accessor license_type: Orb::Price::ScalableMatrixWithTieredPricing::LicenseType? + attr_accessor license_type: Orb::Price::CumulativeGroupedAllocation::LicenseType? def initialize: ( id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::ScalableMatrixWithTieredPricing::billing_mode, - cadence: Orb::Models::Price::ScalableMatrixWithTieredPricing::cadence, - composite_price_filters: ::Array[Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::CumulativeGroupedAllocation::billing_mode, + cadence: Orb::Models::Price::CumulativeGroupedAllocation::cadence, + composite_price_filters: ::Array[Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::ScalableMatrixWithTieredPricing::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::CumulativeGroupedAllocation::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, + cumulative_grouped_allocation_config: Orb::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, currency: String, discount: Orb::Models::discount?, external_price_id: String?, @@ -7680,25 +8728,25 @@ module Orb minimum_amount: String?, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::ScalableMatrixWithTieredPricing::price_type, + price_type: Orb::Models::Price::CumulativeGroupedAllocation::price_type, replaces_price_id: String?, - scalable_matrix_with_tiered_pricing_config: Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, ?dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - ?license_type: Orb::Price::ScalableMatrixWithTieredPricing::LicenseType?, - ?model_type: :scalable_matrix_with_tiered_pricing + ?license_type: Orb::Price::CumulativeGroupedAllocation::LicenseType?, + ?model_type: :cumulative_grouped_allocation ) -> void def to_hash: -> { id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::ScalableMatrixWithTieredPricing::billing_mode, - cadence: Orb::Models::Price::ScalableMatrixWithTieredPricing::cadence, - composite_price_filters: ::Array[Orb::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::CumulativeGroupedAllocation::billing_mode, + cadence: Orb::Models::Price::CumulativeGroupedAllocation::cadence, + composite_price_filters: ::Array[Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::ScalableMatrixWithTieredPricing::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::CumulativeGroupedAllocation::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, + cumulative_grouped_allocation_config: Orb::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, currency: String, discount: Orb::Models::discount?, external_price_id: String?, @@ -7711,14 +8759,13 @@ module Orb metadata: ::Hash[Symbol, String], minimum: Orb::Minimum?, minimum_amount: String?, - model_type: :scalable_matrix_with_tiered_pricing, + model_type: :cumulative_grouped_allocation, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::ScalableMatrixWithTieredPricing::price_type, + price_type: Orb::Models::Price::CumulativeGroupedAllocation::price_type, replaces_price_id: String?, - scalable_matrix_with_tiered_pricing_config: Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig, dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - license_type: Orb::Price::ScalableMatrixWithTieredPricing::LicenseType? + license_type: Orb::Price::CumulativeGroupedAllocation::LicenseType? } type billing_mode = :in_advance | :in_arrear @@ -7729,7 +8776,7 @@ module Orb IN_ADVANCE: :in_advance IN_ARREAR: :in_arrear - def self?.values: -> ::Array[Orb::Models::Price::ScalableMatrixWithTieredPricing::billing_mode] + def self?.values: -> ::Array[Orb::Models::Price::CumulativeGroupedAllocation::billing_mode] end type cadence = @@ -7745,32 +8792,32 @@ module Orb ANNUAL: :annual CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Price::ScalableMatrixWithTieredPricing::cadence] + def self?.values: -> ::Array[Orb::Models::Price::CumulativeGroupedAllocation::cadence] end type composite_price_filter = { - field: Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::field, - operator: Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::operator, + field: Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter::field, + operator: Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter::operator, values: ::Array[String] } class CompositePriceFilter < Orb::Internal::Type::BaseModel - attr_accessor field: Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::field + attr_accessor field: Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter::field - attr_accessor operator: Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::operator + attr_accessor operator: Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter::operator attr_accessor values: ::Array[String] def initialize: ( - field: Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::field, - operator: Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::operator, + field: Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter::field, + operator: Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter::operator, values: ::Array[String] ) -> void def to_hash: -> { - field: Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::field, - operator: Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::operator, + field: Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter::field, + operator: Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter::operator, values: ::Array[String] } @@ -7786,7 +8833,7 @@ module Orb CURRENCY: :currency PRICING_UNIT_ID: :pricing_unit_id - def self?.values: -> ::Array[Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::field] + def self?.values: -> ::Array[Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter::field] end type operator = :includes | :excludes @@ -7797,94 +8844,52 @@ module Orb INCLUDES: :includes EXCLUDES: :excludes - def self?.values: -> ::Array[Orb::Models::Price::ScalableMatrixWithTieredPricing::CompositePriceFilter::operator] + def self?.values: -> ::Array[Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter::operator] end end - type price_type = :usage_price | :fixed_price | :composite_price - - module PriceType - extend Orb::Internal::Type::Enum - - USAGE_PRICE: :usage_price - FIXED_PRICE: :fixed_price - COMPOSITE_PRICE: :composite_price - - def self?.values: -> ::Array[Orb::Models::Price::ScalableMatrixWithTieredPricing::price_type] - end - - type scalable_matrix_with_tiered_pricing_config = + type cumulative_grouped_allocation_config = { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - second_dimension: String? + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - attr_accessor first_dimension: String + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + attr_accessor cumulative_allocation: String - attr_accessor matrix_scaling_factors: ::Array[Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor] + attr_accessor group_allocation: String - attr_accessor tiers: ::Array[Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier] + attr_accessor grouping_key: String - attr_accessor second_dimension: String? + attr_accessor unit_amount: String def initialize: ( - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - ?second_dimension: String? + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String ) -> void def to_hash: -> { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::Price::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier], - second_dimension: String? + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } + end - 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 + type price_type = :usage_price | :fixed_price | :composite_price - attr_accessor unit_amount: String + module PriceType + extend Orb::Internal::Type::Enum - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void + USAGE_PRICE: :usage_price + FIXED_PRICE: :fixed_price + COMPOSITE_PRICE: :composite_price - def to_hash: -> { tier_lower_bound: String, unit_amount: String } - end + def self?.values: -> ::Array[Orb::Models::Price::CumulativeGroupedAllocation::price_type] end type license_type = { id: String, grouping_key: String, name: String } @@ -7906,20 +8911,20 @@ module Orb end end - type cumulative_grouped_bulk = + type daily_credit_allowance = { id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::CumulativeGroupedBulk::billing_mode, - cadence: Orb::Models::Price::CumulativeGroupedBulk::cadence, - composite_price_filters: ::Array[Orb::Price::CumulativeGroupedBulk::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::DailyCreditAllowance::billing_mode, + cadence: Orb::Models::Price::DailyCreditAllowance::cadence, + composite_price_filters: ::Array[Orb::Price::DailyCreditAllowance::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::CumulativeGroupedBulk::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::DailyCreditAllowance::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, - cumulative_grouped_bulk_config: Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, currency: String, + daily_credit_allowance_config: Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, @@ -7931,40 +8936,40 @@ module Orb metadata: ::Hash[Symbol, String], minimum: Orb::Minimum?, minimum_amount: String?, - model_type: :cumulative_grouped_bulk, + model_type: :daily_credit_allowance, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::CumulativeGroupedBulk::price_type, + price_type: Orb::Models::Price::DailyCreditAllowance::price_type, replaces_price_id: String?, dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - license_type: Orb::Price::CumulativeGroupedBulk::LicenseType? + license_type: Orb::Price::DailyCreditAllowance::LicenseType? } - class CumulativeGroupedBulk < Orb::Internal::Type::BaseModel + class DailyCreditAllowance < Orb::Internal::Type::BaseModel attr_accessor id: String attr_accessor billable_metric: Orb::BillableMetricTiny? attr_accessor billing_cycle_configuration: Orb::BillingCycleConfiguration - attr_accessor billing_mode: Orb::Models::Price::CumulativeGroupedBulk::billing_mode + attr_accessor billing_mode: Orb::Models::Price::DailyCreditAllowance::billing_mode - attr_accessor cadence: Orb::Models::Price::CumulativeGroupedBulk::cadence + attr_accessor cadence: Orb::Models::Price::DailyCreditAllowance::cadence - attr_accessor composite_price_filters: ::Array[Orb::Price::CumulativeGroupedBulk::CompositePriceFilter]? + attr_accessor composite_price_filters: ::Array[Orb::Price::DailyCreditAllowance::CompositePriceFilter]? attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Price::CumulativeGroupedBulk::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Price::DailyCreditAllowance::conversion_rate_config? attr_accessor created_at: Time attr_accessor credit_allocation: Orb::Allocation? - attr_accessor cumulative_grouped_bulk_config: Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig - attr_accessor currency: String + attr_accessor daily_credit_allowance_config: Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + attr_accessor discount: Orb::Models::discount? attr_accessor external_price_id: String? @@ -7987,33 +8992,33 @@ module Orb attr_accessor minimum_amount: String? - attr_accessor model_type: :cumulative_grouped_bulk + attr_accessor model_type: :daily_credit_allowance attr_accessor name: String attr_accessor plan_phase_order: Integer? - attr_accessor price_type: Orb::Models::Price::CumulativeGroupedBulk::price_type + attr_accessor price_type: Orb::Models::Price::DailyCreditAllowance::price_type attr_accessor replaces_price_id: String? attr_accessor dimensional_price_configuration: Orb::DimensionalPriceConfiguration? - attr_accessor license_type: Orb::Price::CumulativeGroupedBulk::LicenseType? + attr_accessor license_type: Orb::Price::DailyCreditAllowance::LicenseType? def initialize: ( id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::CumulativeGroupedBulk::billing_mode, - cadence: Orb::Models::Price::CumulativeGroupedBulk::cadence, - composite_price_filters: ::Array[Orb::Price::CumulativeGroupedBulk::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::DailyCreditAllowance::billing_mode, + cadence: Orb::Models::Price::DailyCreditAllowance::cadence, + composite_price_filters: ::Array[Orb::Price::DailyCreditAllowance::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::CumulativeGroupedBulk::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::DailyCreditAllowance::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, - cumulative_grouped_bulk_config: Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, currency: String, + daily_credit_allowance_config: Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, @@ -8027,26 +9032,26 @@ module Orb minimum_amount: String?, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::CumulativeGroupedBulk::price_type, + price_type: Orb::Models::Price::DailyCreditAllowance::price_type, replaces_price_id: String?, ?dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - ?license_type: Orb::Price::CumulativeGroupedBulk::LicenseType?, - ?model_type: :cumulative_grouped_bulk + ?license_type: Orb::Price::DailyCreditAllowance::LicenseType?, + ?model_type: :daily_credit_allowance ) -> void def to_hash: -> { id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::CumulativeGroupedBulk::billing_mode, - cadence: Orb::Models::Price::CumulativeGroupedBulk::cadence, - composite_price_filters: ::Array[Orb::Price::CumulativeGroupedBulk::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::DailyCreditAllowance::billing_mode, + cadence: Orb::Models::Price::DailyCreditAllowance::cadence, + composite_price_filters: ::Array[Orb::Price::DailyCreditAllowance::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::CumulativeGroupedBulk::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::DailyCreditAllowance::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, - cumulative_grouped_bulk_config: Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, currency: String, + daily_credit_allowance_config: Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, discount: Orb::Models::discount?, external_price_id: String?, fixed_price_quantity: Float?, @@ -8058,13 +9063,13 @@ module Orb metadata: ::Hash[Symbol, String], minimum: Orb::Minimum?, minimum_amount: String?, - model_type: :cumulative_grouped_bulk, + model_type: :daily_credit_allowance, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::CumulativeGroupedBulk::price_type, + price_type: Orb::Models::Price::DailyCreditAllowance::price_type, replaces_price_id: String?, dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - license_type: Orb::Price::CumulativeGroupedBulk::LicenseType? + license_type: Orb::Price::DailyCreditAllowance::LicenseType? } type billing_mode = :in_advance | :in_arrear @@ -8075,7 +9080,7 @@ module Orb IN_ADVANCE: :in_advance IN_ARREAR: :in_arrear - def self?.values: -> ::Array[Orb::Models::Price::CumulativeGroupedBulk::billing_mode] + def self?.values: -> ::Array[Orb::Models::Price::DailyCreditAllowance::billing_mode] end type cadence = @@ -8091,32 +9096,32 @@ module Orb ANNUAL: :annual CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Price::CumulativeGroupedBulk::cadence] + def self?.values: -> ::Array[Orb::Models::Price::DailyCreditAllowance::cadence] end type composite_price_filter = { - field: Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter::field, - operator: Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter::operator, + field: Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::field, + operator: Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::operator, values: ::Array[String] } class CompositePriceFilter < Orb::Internal::Type::BaseModel - attr_accessor field: Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter::field + attr_accessor field: Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::field - attr_accessor operator: Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter::operator + attr_accessor operator: Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::operator attr_accessor values: ::Array[String] def initialize: ( - field: Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter::field, - operator: Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter::operator, + field: Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::field, + operator: Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::operator, values: ::Array[String] ) -> void def to_hash: -> { - field: Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter::field, - operator: Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter::operator, + field: Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::field, + operator: Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::operator, values: ::Array[String] } @@ -8132,7 +9137,7 @@ module Orb CURRENCY: :currency PRICING_UNIT_ID: :pricing_unit_id - def self?.values: -> ::Array[Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter::field] + def self?.values: -> ::Array[Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::field] end type operator = :includes | :excludes @@ -8143,54 +9148,61 @@ module Orb INCLUDES: :includes EXCLUDES: :excludes - def self?.values: -> ::Array[Orb::Models::Price::CumulativeGroupedBulk::CompositePriceFilter::operator] + def self?.values: -> ::Array[Orb::Models::Price::DailyCreditAllowance::CompositePriceFilter::operator] end end - type cumulative_grouped_bulk_config = + type daily_credit_allowance_config = { - dimension_values: ::Array[Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] } - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - attr_accessor dimension_values: ::Array[Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue] + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String - attr_accessor group: String + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] def initialize: ( - dimension_values: ::Array[Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] ) -> void def to_hash: -> { - dimension_values: ::Array[Orb::Price::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], - group: String + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] } - type dimension_value = - { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } - - class DimensionValue < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } - attr_accessor tier_lower_bound: String + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] attr_accessor unit_amount: String def initialize: ( - grouping_key: String, - tier_lower_bound: String, + dimension_values: ::Array[String?], unit_amount: String ) -> void def to_hash: -> { - grouping_key: String, - tier_lower_bound: String, + dimension_values: ::Array[String?], unit_amount: String } end @@ -8205,7 +9217,7 @@ module Orb FIXED_PRICE: :fixed_price COMPOSITE_PRICE: :composite_price - def self?.values: -> ::Array[Orb::Models::Price::CumulativeGroupedBulk::price_type] + def self?.values: -> ::Array[Orb::Models::Price::DailyCreditAllowance::price_type] end type license_type = { id: String, grouping_key: String, name: String } @@ -8227,19 +9239,18 @@ module Orb end end - type cumulative_grouped_allocation = + type metered_allowance = { id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::CumulativeGroupedAllocation::billing_mode, - cadence: Orb::Models::Price::CumulativeGroupedAllocation::cadence, - composite_price_filters: ::Array[Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::MeteredAllowance::billing_mode, + cadence: Orb::Models::Price::MeteredAllowance::cadence, + composite_price_filters: ::Array[Orb::Price::MeteredAllowance::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::CumulativeGroupedAllocation::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::MeteredAllowance::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, - cumulative_grouped_allocation_config: Orb::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, currency: String, discount: Orb::Models::discount?, external_price_id: String?, @@ -8250,40 +9261,39 @@ module Orb maximum: Orb::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], + metered_allowance_config: Orb::Price::MeteredAllowance::MeteredAllowanceConfig, minimum: Orb::Minimum?, minimum_amount: String?, - model_type: :cumulative_grouped_allocation, + model_type: :metered_allowance, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::CumulativeGroupedAllocation::price_type, + price_type: Orb::Models::Price::MeteredAllowance::price_type, replaces_price_id: String?, dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - license_type: Orb::Price::CumulativeGroupedAllocation::LicenseType? + license_type: Orb::Price::MeteredAllowance::LicenseType? } - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class MeteredAllowance < Orb::Internal::Type::BaseModel attr_accessor id: String attr_accessor billable_metric: Orb::BillableMetricTiny? attr_accessor billing_cycle_configuration: Orb::BillingCycleConfiguration - attr_accessor billing_mode: Orb::Models::Price::CumulativeGroupedAllocation::billing_mode + attr_accessor billing_mode: Orb::Models::Price::MeteredAllowance::billing_mode - attr_accessor cadence: Orb::Models::Price::CumulativeGroupedAllocation::cadence + attr_accessor cadence: Orb::Models::Price::MeteredAllowance::cadence - attr_accessor composite_price_filters: ::Array[Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter]? + attr_accessor composite_price_filters: ::Array[Orb::Price::MeteredAllowance::CompositePriceFilter]? attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Price::CumulativeGroupedAllocation::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Price::MeteredAllowance::conversion_rate_config? attr_accessor created_at: Time attr_accessor credit_allocation: Orb::Allocation? - attr_accessor cumulative_grouped_allocation_config: Orb::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - attr_accessor currency: String attr_accessor discount: Orb::Models::discount? @@ -8304,36 +9314,37 @@ module Orb attr_accessor metadata: ::Hash[Symbol, String] + attr_accessor metered_allowance_config: Orb::Price::MeteredAllowance::MeteredAllowanceConfig + attr_accessor minimum: Orb::Minimum? attr_accessor minimum_amount: String? - attr_accessor model_type: :cumulative_grouped_allocation + attr_accessor model_type: :metered_allowance attr_accessor name: String attr_accessor plan_phase_order: Integer? - attr_accessor price_type: Orb::Models::Price::CumulativeGroupedAllocation::price_type + attr_accessor price_type: Orb::Models::Price::MeteredAllowance::price_type attr_accessor replaces_price_id: String? attr_accessor dimensional_price_configuration: Orb::DimensionalPriceConfiguration? - attr_accessor license_type: Orb::Price::CumulativeGroupedAllocation::LicenseType? + attr_accessor license_type: Orb::Price::MeteredAllowance::LicenseType? def initialize: ( id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::CumulativeGroupedAllocation::billing_mode, - cadence: Orb::Models::Price::CumulativeGroupedAllocation::cadence, - composite_price_filters: ::Array[Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::MeteredAllowance::billing_mode, + cadence: Orb::Models::Price::MeteredAllowance::cadence, + composite_price_filters: ::Array[Orb::Price::MeteredAllowance::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::CumulativeGroupedAllocation::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::MeteredAllowance::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, - cumulative_grouped_allocation_config: Orb::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, currency: String, discount: Orb::Models::discount?, external_price_id: String?, @@ -8344,29 +9355,29 @@ module Orb maximum: Orb::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], + metered_allowance_config: Orb::Price::MeteredAllowance::MeteredAllowanceConfig, minimum: Orb::Minimum?, minimum_amount: String?, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::CumulativeGroupedAllocation::price_type, + price_type: Orb::Models::Price::MeteredAllowance::price_type, replaces_price_id: String?, ?dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - ?license_type: Orb::Price::CumulativeGroupedAllocation::LicenseType?, - ?model_type: :cumulative_grouped_allocation + ?license_type: Orb::Price::MeteredAllowance::LicenseType?, + ?model_type: :metered_allowance ) -> void def to_hash: -> { id: String, billable_metric: Orb::BillableMetricTiny?, billing_cycle_configuration: Orb::BillingCycleConfiguration, - billing_mode: Orb::Models::Price::CumulativeGroupedAllocation::billing_mode, - cadence: Orb::Models::Price::CumulativeGroupedAllocation::cadence, - composite_price_filters: ::Array[Orb::Price::CumulativeGroupedAllocation::CompositePriceFilter]?, + billing_mode: Orb::Models::Price::MeteredAllowance::billing_mode, + cadence: Orb::Models::Price::MeteredAllowance::cadence, + composite_price_filters: ::Array[Orb::Price::MeteredAllowance::CompositePriceFilter]?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::Price::CumulativeGroupedAllocation::conversion_rate_config?, + conversion_rate_config: Orb::Models::Price::MeteredAllowance::conversion_rate_config?, created_at: Time, credit_allocation: Orb::Allocation?, - cumulative_grouped_allocation_config: Orb::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, currency: String, discount: Orb::Models::discount?, external_price_id: String?, @@ -8377,15 +9388,16 @@ module Orb maximum: Orb::Maximum?, maximum_amount: String?, metadata: ::Hash[Symbol, String], + metered_allowance_config: Orb::Price::MeteredAllowance::MeteredAllowanceConfig, minimum: Orb::Minimum?, minimum_amount: String?, - model_type: :cumulative_grouped_allocation, + model_type: :metered_allowance, name: String, plan_phase_order: Integer?, - price_type: Orb::Models::Price::CumulativeGroupedAllocation::price_type, + price_type: Orb::Models::Price::MeteredAllowance::price_type, replaces_price_id: String?, dimensional_price_configuration: Orb::DimensionalPriceConfiguration?, - license_type: Orb::Price::CumulativeGroupedAllocation::LicenseType? + license_type: Orb::Price::MeteredAllowance::LicenseType? } type billing_mode = :in_advance | :in_arrear @@ -8396,7 +9408,7 @@ module Orb IN_ADVANCE: :in_advance IN_ARREAR: :in_arrear - def self?.values: -> ::Array[Orb::Models::Price::CumulativeGroupedAllocation::billing_mode] + def self?.values: -> ::Array[Orb::Models::Price::MeteredAllowance::billing_mode] end type cadence = @@ -8412,32 +9424,32 @@ module Orb ANNUAL: :annual CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Price::CumulativeGroupedAllocation::cadence] + def self?.values: -> ::Array[Orb::Models::Price::MeteredAllowance::cadence] end type composite_price_filter = { - field: Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter::field, - operator: Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter::operator, + field: Orb::Models::Price::MeteredAllowance::CompositePriceFilter::field, + operator: Orb::Models::Price::MeteredAllowance::CompositePriceFilter::operator, values: ::Array[String] } class CompositePriceFilter < Orb::Internal::Type::BaseModel - attr_accessor field: Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter::field + attr_accessor field: Orb::Models::Price::MeteredAllowance::CompositePriceFilter::field - attr_accessor operator: Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter::operator + attr_accessor operator: Orb::Models::Price::MeteredAllowance::CompositePriceFilter::operator attr_accessor values: ::Array[String] def initialize: ( - field: Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter::field, - operator: Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter::operator, + field: Orb::Models::Price::MeteredAllowance::CompositePriceFilter::field, + operator: Orb::Models::Price::MeteredAllowance::CompositePriceFilter::operator, values: ::Array[String] ) -> void def to_hash: -> { - field: Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter::field, - operator: Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter::operator, + field: Orb::Models::Price::MeteredAllowance::CompositePriceFilter::field, + operator: Orb::Models::Price::MeteredAllowance::CompositePriceFilter::operator, values: ::Array[String] } @@ -8453,7 +9465,7 @@ module Orb CURRENCY: :currency PRICING_UNIT_ID: :pricing_unit_id - def self?.values: -> ::Array[Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter::field] + def self?.values: -> ::Array[Orb::Models::Price::MeteredAllowance::CompositePriceFilter::field] end type operator = :includes | :excludes @@ -8464,39 +9476,53 @@ module Orb INCLUDES: :includes EXCLUDES: :excludes - def self?.values: -> ::Array[Orb::Models::Price::CumulativeGroupedAllocation::CompositePriceFilter::operator] + def self?.values: -> ::Array[Orb::Models::Price::MeteredAllowance::CompositePriceFilter::operator] end end - type cumulative_grouped_allocation_config = + type metered_allowance_config = { - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor cumulative_allocation: String + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String - attr_accessor group_allocation: String + attr_accessor consumption_grouping_value: String attr_accessor grouping_key: String attr_accessor unit_amount: String + attr_reader allowance_display_name: String? + + def allowance_display_name=: (String) -> String + + attr_reader consumption_display_name: String? + + def consumption_display_name=: (String) -> String + def initialize: ( - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String ) -> void def to_hash: -> { - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } end @@ -8509,7 +9535,7 @@ module Orb FIXED_PRICE: :fixed_price COMPOSITE_PRICE: :composite_price - def self?.values: -> ::Array[Orb::Models::Price::CumulativeGroupedAllocation::price_type] + def self?.values: -> ::Array[Orb::Models::Price::MeteredAllowance::price_type] end type license_type = { id: String, grouping_key: String, name: String } diff --git a/sig/orb/models/price_create_params.rbs b/sig/orb/models/price_create_params.rbs index a3562fbc..4da529a7 100644 --- a/sig/orb/models/price_create_params.rbs +++ b/sig/orb/models/price_create_params.rbs @@ -35,6 +35,7 @@ module Orb | Orb::NewFloatingPackageWithAllocationPrice | Orb::NewFloatingUnitWithPercentPrice | Orb::NewFloatingMatrixWithAllocationPrice + | Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts | Orb::NewFloatingTieredWithProrationPrice | Orb::NewFloatingUnitWithProrationPrice | Orb::NewFloatingGroupedAllocationPrice @@ -49,6 +50,8 @@ module Orb | Orb::NewFloatingScalableMatrixWithTieredPricingPrice | Orb::NewFloatingCumulativeGroupedBulkPrice | Orb::PriceCreateParams::Body::CumulativeGroupedAllocation + | Orb::PriceCreateParams::Body::DailyCreditAllowance + | Orb::PriceCreateParams::Body::MeteredAllowance | Orb::NewFloatingMinimumCompositePrice | Orb::PriceCreateParams::Body::Percent | Orb::PriceCreateParams::Body::EventOutput @@ -226,6 +229,229 @@ module Orb end end + type matrix_with_threshold_discounts = + { + cadence: Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::cadence, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor matrix_with_threshold_discounts_config: Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + + attr_accessor model_type: :matrix_with_threshold_discounts + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::conversion_rate_config? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + cadence: Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::cadence, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::conversion_rate_config?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?model_type: :matrix_with_threshold_discounts + ) -> void + + def to_hash: -> { + cadence: Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::cadence, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::cadence] + end + + type matrix_with_threshold_discounts_config = + { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor first_dimension: String + + attr_accessor matrix_values: ::Array[Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] + + attr_accessor second_dimension: String? + + attr_reader threshold_discount_groups: ::Array[Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup]? + + def threshold_discount_groups=: ( + ::Array[Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> ::Array[Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + + def initialize: ( + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + ?second_dimension: String?, + ?threshold_discount_groups: ::Array[Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> void + + def to_hash: -> { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + type matrix_value = + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor first_dimension_value: String + + attr_accessor unit_amount: String + + attr_accessor second_dimension_value: String? + + def initialize: ( + first_dimension_value: String, + unit_amount: String, + ?second_dimension_value: String? + ) -> void + + def to_hash: -> { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + end + + type threshold_discount_group = + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + attr_accessor above_threshold_discount_percentage: String + + attr_accessor below_threshold_discount_percentage: String + + attr_accessor cell_coordinates: String + + attr_accessor threshold_amount: String + + attr_accessor description: String? + + def initialize: ( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + ?description: String? + ) -> void + + def to_hash: -> { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + end + end + end + type grouped_with_min_max_thresholds = { cadence: Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds::cadence, @@ -526,6 +752,344 @@ module Orb end end + type daily_credit_allowance = + { + cadence: Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::cadence, + currency: String, + daily_credit_allowance_config: Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::cadence + + attr_accessor currency: String + + attr_accessor daily_credit_allowance_config: Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig + + attr_accessor item_id: String + + attr_accessor model_type: :daily_credit_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::conversion_rate_config? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + cadence: Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::cadence, + currency: String, + daily_credit_allowance_config: Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::conversion_rate_config?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?model_type: :daily_credit_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::cadence, + currency: String, + daily_credit_allowance_config: Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::cadence] + end + + type daily_credit_allowance_config = + { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String + + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + + def initialize: ( + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + ) -> void + + def to_hash: -> { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end + end + end + + type metered_allowance = + { + cadence: Orb::Models::PriceCreateParams::Body::MeteredAllowance::cadence, + currency: String, + item_id: String, + metered_allowance_config: Orb::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceCreateParams::Body::MeteredAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PriceCreateParams::Body::MeteredAllowance::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor metered_allowance_config: Orb::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig + + attr_accessor model_type: :metered_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::PriceCreateParams::Body::MeteredAllowance::conversion_rate_config? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + cadence: Orb::Models::PriceCreateParams::Body::MeteredAllowance::cadence, + currency: String, + item_id: String, + metered_allowance_config: Orb::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::PriceCreateParams::Body::MeteredAllowance::conversion_rate_config?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?model_type: :metered_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::PriceCreateParams::Body::MeteredAllowance::cadence, + currency: String, + item_id: String, + metered_allowance_config: Orb::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceCreateParams::Body::MeteredAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::PriceCreateParams::Body::MeteredAllowance::cadence] + end + + type metered_allowance_config = + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String + + attr_accessor consumption_grouping_value: String + + attr_accessor grouping_key: String + + attr_accessor unit_amount: String + + attr_reader allowance_display_name: String? + + def allowance_display_name=: (String) -> String + + attr_reader consumption_display_name: String? + + def consumption_display_name=: (String) -> String + + def initialize: ( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String + ) -> void + + def to_hash: -> { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + end + end + type percent = { cadence: Orb::Models::PriceCreateParams::Body::Percent::cadence, diff --git a/sig/orb/models/price_evaluate_multiple_params.rbs b/sig/orb/models/price_evaluate_multiple_params.rbs index 61cbdc7d..52c2ae32 100644 --- a/sig/orb/models/price_evaluate_multiple_params.rbs +++ b/sig/orb/models/price_evaluate_multiple_params.rbs @@ -104,6 +104,7 @@ module Orb | Orb::NewFloatingPackageWithAllocationPrice | Orb::NewFloatingUnitWithPercentPrice | Orb::NewFloatingMatrixWithAllocationPrice + | Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts | Orb::NewFloatingTieredWithProrationPrice | Orb::NewFloatingUnitWithProrationPrice | Orb::NewFloatingGroupedAllocationPrice @@ -118,6 +119,8 @@ module Orb | Orb::NewFloatingScalableMatrixWithTieredPricingPrice | Orb::NewFloatingCumulativeGroupedBulkPrice | Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::CumulativeGroupedAllocation + | Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance + | Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance | Orb::NewFloatingMinimumCompositePrice | Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent | Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::EventOutput @@ -303,6 +306,234 @@ module Orb end end + type matrix_with_threshold_discounts = + { + cadence: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::cadence, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor matrix_with_threshold_discounts_config: Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + + attr_accessor model_type: :matrix_with_threshold_discounts + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::conversion_rate_config? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + cadence: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::cadence, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?model_type: :matrix_with_threshold_discounts + ) -> void + + def to_hash: -> { + cadence: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::cadence, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::cadence] + end + + type matrix_with_threshold_discounts_config = + { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor first_dimension: String + + attr_accessor matrix_values: ::Array[Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] + + attr_accessor second_dimension: String? + + attr_reader threshold_discount_groups: ::Array[Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup]? + + def threshold_discount_groups=: ( + ::Array[Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> ::Array[Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + + def initialize: ( + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + ?second_dimension: String?, + ?threshold_discount_groups: ::Array[Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> void + + def to_hash: -> { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + type matrix_value = + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor first_dimension_value: String + + attr_accessor unit_amount: String + + attr_accessor second_dimension_value: String? + + def initialize: ( + first_dimension_value: String, + unit_amount: String, + ?second_dimension_value: String? + ) -> void + + def to_hash: -> { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + end + + type threshold_discount_group = + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + attr_accessor above_threshold_discount_percentage: String + + attr_accessor below_threshold_discount_percentage: String + + attr_accessor cell_coordinates: String + + attr_accessor threshold_amount: String + + attr_accessor description: String? + + def initialize: ( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + ?description: String? + ) -> void + + def to_hash: -> { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + end + end + end + type grouped_with_min_max_thresholds = { cadence: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::cadence, @@ -613,6 +844,354 @@ module Orb end end + type daily_credit_allowance = + { + cadence: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::cadence, + currency: String, + daily_credit_allowance_config: Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::cadence + + attr_accessor currency: String + + attr_accessor daily_credit_allowance_config: Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + + attr_accessor item_id: String + + attr_accessor model_type: :daily_credit_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::conversion_rate_config? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + cadence: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::cadence, + currency: String, + daily_credit_allowance_config: Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::conversion_rate_config?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?model_type: :daily_credit_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::cadence, + currency: String, + daily_credit_allowance_config: Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::cadence] + end + + type daily_credit_allowance_config = + { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String + + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + + def initialize: ( + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + ) -> void + + def to_hash: -> { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end + end + end + + type metered_allowance = + { + cadence: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::cadence, + currency: String, + item_id: String, + metered_allowance_config: Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor metered_allowance_config: Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig + + attr_accessor model_type: :metered_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::conversion_rate_config? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + cadence: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::cadence, + currency: String, + item_id: String, + metered_allowance_config: Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::conversion_rate_config?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?model_type: :metered_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::cadence, + currency: String, + item_id: String, + metered_allowance_config: Orb::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::MeteredAllowance::cadence] + end + + type metered_allowance_config = + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String + + attr_accessor consumption_grouping_value: String + + attr_accessor grouping_key: String + + attr_accessor unit_amount: String + + attr_reader allowance_display_name: String? + + def allowance_display_name=: (String) -> String + + attr_reader consumption_display_name: String? + + def consumption_display_name=: (String) -> String + + def initialize: ( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String + ) -> void + + def to_hash: -> { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + end + end + type percent = { cadence: Orb::Models::PriceEvaluateMultipleParams::PriceEvaluation::Price::Percent::cadence, diff --git a/sig/orb/models/price_evaluate_preview_events_params.rbs b/sig/orb/models/price_evaluate_preview_events_params.rbs index b59ef66f..2ec5edc7 100644 --- a/sig/orb/models/price_evaluate_preview_events_params.rbs +++ b/sig/orb/models/price_evaluate_preview_events_params.rbs @@ -150,6 +150,7 @@ module Orb | Orb::NewFloatingPackageWithAllocationPrice | Orb::NewFloatingUnitWithPercentPrice | Orb::NewFloatingMatrixWithAllocationPrice + | Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts | Orb::NewFloatingTieredWithProrationPrice | Orb::NewFloatingUnitWithProrationPrice | Orb::NewFloatingGroupedAllocationPrice @@ -164,6 +165,8 @@ module Orb | Orb::NewFloatingScalableMatrixWithTieredPricingPrice | Orb::NewFloatingCumulativeGroupedBulkPrice | Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation + | Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance + | Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance | Orb::NewFloatingMinimumCompositePrice | Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent | Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput @@ -349,6 +352,234 @@ module Orb end end + type matrix_with_threshold_discounts = + { + cadence: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::cadence, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor matrix_with_threshold_discounts_config: Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + + attr_accessor model_type: :matrix_with_threshold_discounts + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::conversion_rate_config? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + cadence: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::cadence, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?model_type: :matrix_with_threshold_discounts + ) -> void + + def to_hash: -> { + cadence: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::cadence, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::cadence] + end + + type matrix_with_threshold_discounts_config = + { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor first_dimension: String + + attr_accessor matrix_values: ::Array[Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] + + attr_accessor second_dimension: String? + + attr_reader threshold_discount_groups: ::Array[Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup]? + + def threshold_discount_groups=: ( + ::Array[Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> ::Array[Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + + def initialize: ( + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + ?second_dimension: String?, + ?threshold_discount_groups: ::Array[Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> void + + def to_hash: -> { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + type matrix_value = + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor first_dimension_value: String + + attr_accessor unit_amount: String + + attr_accessor second_dimension_value: String? + + def initialize: ( + first_dimension_value: String, + unit_amount: String, + ?second_dimension_value: String? + ) -> void + + def to_hash: -> { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + end + + type threshold_discount_group = + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + attr_accessor above_threshold_discount_percentage: String + + attr_accessor below_threshold_discount_percentage: String + + attr_accessor cell_coordinates: String + + attr_accessor threshold_amount: String + + attr_accessor description: String? + + def initialize: ( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + ?description: String? + ) -> void + + def to_hash: -> { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + end + end + end + type grouped_with_min_max_thresholds = { cadence: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::cadence, @@ -659,6 +890,354 @@ module Orb end end + type daily_credit_allowance = + { + cadence: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::cadence, + currency: String, + daily_credit_allowance_config: Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::cadence + + attr_accessor currency: String + + attr_accessor daily_credit_allowance_config: Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + + attr_accessor item_id: String + + attr_accessor model_type: :daily_credit_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::conversion_rate_config? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + cadence: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::cadence, + currency: String, + daily_credit_allowance_config: Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::conversion_rate_config?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?model_type: :daily_credit_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::cadence, + currency: String, + daily_credit_allowance_config: Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::cadence] + end + + type daily_credit_allowance_config = + { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String + + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + + def initialize: ( + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + ) -> void + + def to_hash: -> { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end + end + end + + type metered_allowance = + { + cadence: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::cadence, + currency: String, + item_id: String, + metered_allowance_config: Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor metered_allowance_config: Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig + + attr_accessor model_type: :metered_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::conversion_rate_config? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + cadence: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::cadence, + currency: String, + item_id: String, + metered_allowance_config: Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::conversion_rate_config?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?model_type: :metered_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::cadence, + currency: String, + item_id: String, + metered_allowance_config: Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::cadence] + end + + type metered_allowance_config = + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String + + attr_accessor consumption_grouping_value: String + + attr_accessor grouping_key: String + + attr_accessor unit_amount: String + + attr_reader allowance_display_name: String? + + def allowance_display_name=: (String) -> String + + attr_reader consumption_display_name: String? + + def consumption_display_name=: (String) -> String + + def initialize: ( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String + ) -> void + + def to_hash: -> { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + end + end + type percent = { cadence: Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent::cadence, diff --git a/sig/orb/models/subscription_create_params.rbs b/sig/orb/models/subscription_create_params.rbs index 0fdf79d2..6a2c5740 100644 --- a/sig/orb/models/subscription_create_params.rbs +++ b/sig/orb/models/subscription_create_params.rbs @@ -310,6 +310,7 @@ module Orb | Orb::NewSubscriptionPackageWithAllocationPrice | Orb::NewSubscriptionUnitWithPercentPrice | Orb::NewSubscriptionMatrixWithAllocationPrice + | Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts | Orb::SubscriptionCreateParams::AddPrice::Price::TieredWithProration | Orb::NewSubscriptionUnitWithProrationPrice | Orb::NewSubscriptionGroupedAllocationPrice @@ -324,6 +325,8 @@ module Orb | Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice | Orb::NewSubscriptionCumulativeGroupedBulkPrice | Orb::SubscriptionCreateParams::AddPrice::Price::CumulativeGroupedAllocation + | Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance + | Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance | Orb::NewSubscriptionMinimumCompositePrice | Orb::SubscriptionCreateParams::AddPrice::Price::Percent | Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput @@ -514,6 +517,239 @@ module Orb end end + type matrix_with_threshold_discounts = + { + cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence + + attr_accessor item_id: String + + attr_accessor matrix_with_threshold_discounts_config: Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + + attr_accessor model_type: :matrix_with_threshold_discounts + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :matrix_with_threshold_discounts + ) -> void + + def to_hash: -> { + cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence] + end + + type matrix_with_threshold_discounts_config = + { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor first_dimension: String + + attr_accessor matrix_values: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] + + attr_accessor second_dimension: String? + + attr_reader threshold_discount_groups: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup]? + + def threshold_discount_groups=: ( + ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + + def initialize: ( + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + ?second_dimension: String?, + ?threshold_discount_groups: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> void + + def to_hash: -> { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + type matrix_value = + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor first_dimension_value: String + + attr_accessor unit_amount: String + + attr_accessor second_dimension_value: String? + + def initialize: ( + first_dimension_value: String, + unit_amount: String, + ?second_dimension_value: String? + ) -> void + + def to_hash: -> { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + end + + type threshold_discount_group = + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + attr_accessor above_threshold_discount_percentage: String + + attr_accessor below_threshold_discount_percentage: String + + attr_accessor cell_coordinates: String + + attr_accessor threshold_amount: String + + attr_accessor description: String? + + def initialize: ( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + ?description: String? + ) -> void + + def to_hash: -> { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + end + end + end + type tiered_with_proration = { cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::TieredWithProration::cadence, @@ -997,18 +1233,18 @@ module Orb end end - type percent = + type daily_credit_allowance = { - cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent::cadence, + cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, - model_type: :percent, + model_type: :daily_credit_allowance, name: String, - percent_config: Orb::SubscriptionCreateParams::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::SubscriptionCreateParams::AddPrice::Price::Percent::conversion_rate_config?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1020,17 +1256,17 @@ module Orb reference_id: String? } - class Percent < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent::cadence + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::cadence + + attr_accessor daily_credit_allowance_config: Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig attr_accessor item_id: String - attr_accessor model_type: :percent + attr_accessor model_type: :daily_credit_allowance attr_accessor name: String - attr_accessor percent_config: Orb::SubscriptionCreateParams::AddPrice::Price::Percent::PercentConfig - attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -1039,7 +1275,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config? attr_accessor currency: String? @@ -1060,15 +1296,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent::cadence, + cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, name: String, - percent_config: Orb::SubscriptionCreateParams::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::SubscriptionCreateParams::AddPrice::Price::Percent::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -1078,20 +1314,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :percent + ?model_type: :daily_credit_allowance ) -> void def to_hash: -> { - cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent::cadence, + cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, - model_type: :percent, + model_type: :daily_credit_allowance, name: String, - percent_config: Orb::SubscriptionCreateParams::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::SubscriptionCreateParams::AddPrice::Price::Percent::conversion_rate_config?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1121,32 +1357,78 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent::cadence] + def self?.values: -> ::Array[Orb::Models::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::cadence] end - type percent_config = { percent: Float } + type daily_credit_allowance_config = + { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } - class PercentConfig < Orb::Internal::Type::BaseModel - attr_accessor percent: Float + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String - def initialize: (percent: Float) -> void + attr_accessor default_unit_amount: String - def to_hash: -> { percent: Float } + attr_accessor dimensions: ::Array[String?] + + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + + def initialize: ( + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + ) -> void + + def to_hash: -> { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionCreateParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end end end - type event_output = + type metered_allowance = { - cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput::cadence, - event_output_config: Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig, + cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::cadence, item_id: String, - model_type: :event_output, + metered_allowance_config: Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput::conversion_rate_config?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1158,14 +1440,14 @@ module Orb reference_id: String? } - class EventOutput < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput::cadence - - attr_accessor event_output_config: Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::cadence attr_accessor item_id: String - attr_accessor model_type: :event_output + attr_accessor metered_allowance_config: Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig + + attr_accessor model_type: :metered_allowance attr_accessor name: String @@ -1177,7 +1459,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::conversion_rate_config? attr_accessor currency: String? @@ -1198,15 +1480,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput::cadence, - event_output_config: Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig, + cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::cadence, item_id: String, + metered_allowance_config: Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, name: String, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -1216,20 +1498,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :event_output + ?model_type: :metered_allowance ) -> void def to_hash: -> { - cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput::cadence, - event_output_config: Orb::SubscriptionCreateParams::AddPrice::Price::EventOutput::EventOutputConfig, + cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::cadence, item_id: String, - model_type: :event_output, + metered_allowance_config: Orb::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput::conversion_rate_config?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1259,222 +1541,953 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::SubscriptionCreateParams::AddPrice::Price::EventOutput::cadence] + def self?.values: -> ::Array[Orb::Models::SubscriptionCreateParams::AddPrice::Price::MeteredAllowance::cadence] end - type event_output_config = + type metered_allowance_config = { - unit_rating_key: String, - default_unit_rate: String?, - grouping_key: String? + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } - class EventOutputConfig < Orb::Internal::Type::BaseModel - attr_accessor unit_rating_key: String + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String - attr_accessor default_unit_rate: String? + attr_accessor consumption_grouping_value: String - attr_accessor grouping_key: String? + attr_accessor grouping_key: String + + attr_accessor unit_amount: String + + attr_reader allowance_display_name: String? + + def allowance_display_name=: (String) -> String + + attr_reader consumption_display_name: String? + + def consumption_display_name=: (String) -> String def initialize: ( - unit_rating_key: String, - ?default_unit_rate: String?, - ?grouping_key: String? + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String ) -> void def to_hash: -> { - unit_rating_key: String, - default_unit_rate: String?, - grouping_key: String? + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } end end - def self?.variants: -> ::Array[Orb::Models::SubscriptionCreateParams::AddPrice::price] - end - end - - type external_marketplace = :google | :aws | :azure - - module ExternalMarketplace + type percent = + { + cadence: Orb::Models::SubscriptionCreateParams::AddPrice::Price::Percent::cadence, + item_id: String, + model_type: :percent, + name: String, + percent_config: Orb::SubscriptionCreateParams::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::SubscriptionCreateParams::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::SubscriptionCreateParams::AddPrice::Price::Percent::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :percent + + attr_accessor name: String + + attr_accessor percent_config: Orb::SubscriptionCreateParams::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::SubscriptionCreateParams::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::SubscriptionCreateParams::AddPrice::Price::Percent::cadence, + item_id: String, + name: String, + percent_config: Orb::SubscriptionCreateParams::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::SubscriptionCreateParams::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::SubscriptionCreateParams::AddPrice::Price::Percent::cadence, + item_id: String, + model_type: :percent, + name: String, + percent_config: Orb::SubscriptionCreateParams::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::SubscriptionCreateParams::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::SubscriptionCreateParams::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::SubscriptionCreateParams::AddPrice::Price::EventOutput::cadence, + event_output_config: Orb::SubscriptionCreateParams::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::SubscriptionCreateParams::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::SubscriptionCreateParams::AddPrice::Price::EventOutput::cadence + + attr_accessor event_output_config: Orb::SubscriptionCreateParams::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::SubscriptionCreateParams::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::SubscriptionCreateParams::AddPrice::Price::EventOutput::cadence, + event_output_config: Orb::SubscriptionCreateParams::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::SubscriptionCreateParams::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::SubscriptionCreateParams::AddPrice::Price::EventOutput::cadence, + event_output_config: Orb::SubscriptionCreateParams::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::SubscriptionCreateParams::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::SubscriptionCreateParams::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::SubscriptionCreateParams::AddPrice::price] + end + end + + type external_marketplace = :google | :aws | :azure + + module ExternalMarketplace extend Orb::Internal::Type::Enum - GOOGLE: :google - AWS: :aws - AZURE: :azure + GOOGLE: :google + AWS: :aws + AZURE: :azure + + def self?.values: -> ::Array[Orb::Models::SubscriptionCreateParams::external_marketplace] + end + + type remove_adjustment = { adjustment_id: String } + + class RemoveAdjustment < Orb::Internal::Type::BaseModel + attr_accessor adjustment_id: String + + def initialize: (adjustment_id: String) -> void + + def to_hash: -> { adjustment_id: String } + end + + type remove_price = { external_price_id: String?, price_id: String? } + + class RemovePrice < Orb::Internal::Type::BaseModel + attr_accessor external_price_id: String? + + attr_accessor price_id: String? + + def initialize: ( + ?external_price_id: String?, + ?price_id: String? + ) -> void + + def to_hash: -> { external_price_id: String?, price_id: String? } + end + + type replace_adjustment = + { + adjustment: Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::adjustment, + replaces_adjustment_id: String + } + + class ReplaceAdjustment < Orb::Internal::Type::BaseModel + attr_accessor adjustment: Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::adjustment + + attr_accessor replaces_adjustment_id: String + + def initialize: ( + adjustment: Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::adjustment, + replaces_adjustment_id: String + ) -> void + + def to_hash: -> { + adjustment: Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::adjustment, + replaces_adjustment_id: String + } + + 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::SubscriptionCreateParams::ReplaceAdjustment::adjustment] + end + end + + type replace_price = + { + replaces_price_id: String, + allocation_price: Orb::NewAllocationPrice?, + discounts: ::Array[Orb::DiscountOverride]?, + external_price_id: String?, + fixed_price_quantity: Float?, + maximum_amount: String?, + metric_parameter_overrides: ::Hash[Symbol, top]?, + minimum_amount: String?, + price: Orb::Models::SubscriptionCreateParams::ReplacePrice::price?, + price_id: String? + } + + class ReplacePrice < Orb::Internal::Type::BaseModel + attr_accessor replaces_price_id: String + + attr_accessor allocation_price: Orb::NewAllocationPrice? + + attr_accessor discounts: ::Array[Orb::DiscountOverride]? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor maximum_amount: String? + + attr_accessor metric_parameter_overrides: ::Hash[Symbol, top]? + + attr_accessor minimum_amount: String? + + attr_accessor price: Orb::Models::SubscriptionCreateParams::ReplacePrice::price? + + attr_accessor price_id: String? + + def initialize: ( + replaces_price_id: String, + ?allocation_price: Orb::NewAllocationPrice?, + ?discounts: ::Array[Orb::DiscountOverride]?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?maximum_amount: String?, + ?metric_parameter_overrides: ::Hash[Symbol, top]?, + ?minimum_amount: String?, + ?price: Orb::Models::SubscriptionCreateParams::ReplacePrice::price?, + ?price_id: String? + ) -> void + + def to_hash: -> { + replaces_price_id: String, + allocation_price: Orb::NewAllocationPrice?, + discounts: ::Array[Orb::DiscountOverride]?, + external_price_id: String?, + fixed_price_quantity: Float?, + maximum_amount: String?, + metric_parameter_overrides: ::Hash[Symbol, top]?, + minimum_amount: String?, + price: Orb::Models::SubscriptionCreateParams::ReplacePrice::price?, + price_id: String? + } + + type price = + Orb::NewSubscriptionUnitPrice + | Orb::NewSubscriptionTieredPrice + | Orb::NewSubscriptionBulkPrice + | Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters + | Orb::NewSubscriptionPackagePrice + | Orb::NewSubscriptionMatrixPrice + | Orb::NewSubscriptionThresholdTotalAmountPrice + | Orb::NewSubscriptionTieredPackagePrice + | Orb::NewSubscriptionTieredWithMinimumPrice + | Orb::NewSubscriptionGroupedTieredPrice + | Orb::NewSubscriptionTieredPackageWithMinimumPrice + | Orb::NewSubscriptionPackageWithAllocationPrice + | Orb::NewSubscriptionUnitWithPercentPrice + | Orb::NewSubscriptionMatrixWithAllocationPrice + | Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts + | Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration + | Orb::NewSubscriptionUnitWithProrationPrice + | Orb::NewSubscriptionGroupedAllocationPrice + | Orb::NewSubscriptionBulkWithProrationPrice + | Orb::NewSubscriptionGroupedWithProratedMinimumPrice + | Orb::NewSubscriptionGroupedWithMeteredMinimumPrice + | Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds + | Orb::NewSubscriptionMatrixWithDisplayNamePrice + | Orb::NewSubscriptionGroupedTieredPackagePrice + | Orb::NewSubscriptionMaxGroupTieredPackagePrice + | Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice + | Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice + | Orb::NewSubscriptionCumulativeGroupedBulkPrice + | Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation + | Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance + | Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance + | Orb::NewSubscriptionMinimumCompositePrice + | Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent + | Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput + + module Price + extend Orb::Internal::Type::Union + + type bulk_with_filters = + { + bulk_with_filters_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::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::SubscriptionCreateParams::ReplacePrice::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::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig + + attr_accessor cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::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::SubscriptionCreateParams::ReplacePrice::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::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::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::SubscriptionCreateParams::ReplacePrice::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::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::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::SubscriptionCreateParams::ReplacePrice::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? + } - def self?.values: -> ::Array[Orb::Models::SubscriptionCreateParams::external_marketplace] - end + type bulk_with_filters_config = + { + filters: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], + tiers: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] + } - type remove_adjustment = { adjustment_id: String } + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + attr_accessor filters: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter] - class RemoveAdjustment < Orb::Internal::Type::BaseModel - attr_accessor adjustment_id: String + attr_accessor tiers: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] - def initialize: (adjustment_id: String) -> void + def initialize: ( + filters: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], + tiers: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] + ) -> void - def to_hash: -> { adjustment_id: String } - end + def to_hash: -> { + filters: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], + tiers: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] + } - type remove_price = { external_price_id: String?, price_id: String? } + type filter = { property_key: String, property_value: String } - class RemovePrice < Orb::Internal::Type::BaseModel - attr_accessor external_price_id: String? + class Filter < Orb::Internal::Type::BaseModel + attr_accessor property_key: String - attr_accessor price_id: String? + attr_accessor property_value: String - def initialize: ( - ?external_price_id: String?, - ?price_id: String? - ) -> void + def initialize: ( + property_key: String, + property_value: String + ) -> void - def to_hash: -> { external_price_id: String?, price_id: String? } - end + def to_hash: -> { property_key: String, property_value: String } + end - type replace_adjustment = - { - adjustment: Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::adjustment, - replaces_adjustment_id: String - } + type tier = { unit_amount: String, tier_lower_bound: String? } - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - attr_accessor adjustment: Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::adjustment + class Tier < Orb::Internal::Type::BaseModel + attr_accessor unit_amount: String - attr_accessor replaces_adjustment_id: String + attr_accessor tier_lower_bound: String? - def initialize: ( - adjustment: Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::adjustment, - replaces_adjustment_id: String - ) -> void + def initialize: ( + unit_amount: String, + ?tier_lower_bound: String? + ) -> void - def to_hash: -> { - adjustment: Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::adjustment, - replaces_adjustment_id: String - } + def to_hash: -> { + unit_amount: String, + tier_lower_bound: String? + } + end + end - type adjustment = - Orb::NewPercentageDiscount - | Orb::NewUsageDiscount - | Orb::NewAmountDiscount - | Orb::NewMinimum - | Orb::NewMaximum + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom - module Adjustment - extend Orb::Internal::Type::Union + module Cadence + extend Orb::Internal::Type::Enum - def self?.variants: -> ::Array[Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::adjustment] - end - end + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom - type replace_price = - { - replaces_price_id: String, - allocation_price: Orb::NewAllocationPrice?, - discounts: ::Array[Orb::DiscountOverride]?, - external_price_id: String?, - fixed_price_quantity: Float?, - maximum_amount: String?, - metric_parameter_overrides: ::Hash[Symbol, top]?, - minimum_amount: String?, - price: Orb::Models::SubscriptionCreateParams::ReplacePrice::price?, - price_id: String? - } + def self?.values: -> ::Array[Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::cadence] + end + end + + type matrix_with_threshold_discounts = + { + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence + + attr_accessor item_id: String + + attr_accessor matrix_with_threshold_discounts_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + + attr_accessor model_type: :matrix_with_threshold_discounts + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :matrix_with_threshold_discounts + ) -> void + + def to_hash: -> { + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence] + end + + type matrix_with_threshold_discounts_config = + { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor first_dimension: String + + attr_accessor matrix_values: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] + + attr_accessor second_dimension: String? + + attr_reader threshold_discount_groups: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup]? - class ReplacePrice < Orb::Internal::Type::BaseModel - attr_accessor replaces_price_id: String + def threshold_discount_groups=: ( + ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] - attr_accessor allocation_price: Orb::NewAllocationPrice? + def initialize: ( + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + ?second_dimension: String?, + ?threshold_discount_groups: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> void - attr_accessor discounts: ::Array[Orb::DiscountOverride]? + def to_hash: -> { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } - attr_accessor external_price_id: String? + type matrix_value = + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } - attr_accessor fixed_price_quantity: Float? + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor first_dimension_value: String - attr_accessor maximum_amount: String? + attr_accessor unit_amount: String - attr_accessor metric_parameter_overrides: ::Hash[Symbol, top]? + attr_accessor second_dimension_value: String? - attr_accessor minimum_amount: String? + def initialize: ( + first_dimension_value: String, + unit_amount: String, + ?second_dimension_value: String? + ) -> void - attr_accessor price: Orb::Models::SubscriptionCreateParams::ReplacePrice::price? + def to_hash: -> { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + end - attr_accessor price_id: String? + type threshold_discount_group = + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } - def initialize: ( - replaces_price_id: String, - ?allocation_price: Orb::NewAllocationPrice?, - ?discounts: ::Array[Orb::DiscountOverride]?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?maximum_amount: String?, - ?metric_parameter_overrides: ::Hash[Symbol, top]?, - ?minimum_amount: String?, - ?price: Orb::Models::SubscriptionCreateParams::ReplacePrice::price?, - ?price_id: String? - ) -> void + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + attr_accessor above_threshold_discount_percentage: String - def to_hash: -> { - replaces_price_id: String, - allocation_price: Orb::NewAllocationPrice?, - discounts: ::Array[Orb::DiscountOverride]?, - external_price_id: String?, - fixed_price_quantity: Float?, - maximum_amount: String?, - metric_parameter_overrides: ::Hash[Symbol, top]?, - minimum_amount: String?, - price: Orb::Models::SubscriptionCreateParams::ReplacePrice::price?, - price_id: String? - } + attr_accessor below_threshold_discount_percentage: String - type price = - Orb::NewSubscriptionUnitPrice - | Orb::NewSubscriptionTieredPrice - | Orb::NewSubscriptionBulkPrice - | Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters - | Orb::NewSubscriptionPackagePrice - | Orb::NewSubscriptionMatrixPrice - | Orb::NewSubscriptionThresholdTotalAmountPrice - | Orb::NewSubscriptionTieredPackagePrice - | Orb::NewSubscriptionTieredWithMinimumPrice - | Orb::NewSubscriptionGroupedTieredPrice - | Orb::NewSubscriptionTieredPackageWithMinimumPrice - | Orb::NewSubscriptionPackageWithAllocationPrice - | Orb::NewSubscriptionUnitWithPercentPrice - | Orb::NewSubscriptionMatrixWithAllocationPrice - | Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration - | Orb::NewSubscriptionUnitWithProrationPrice - | Orb::NewSubscriptionGroupedAllocationPrice - | Orb::NewSubscriptionBulkWithProrationPrice - | Orb::NewSubscriptionGroupedWithProratedMinimumPrice - | Orb::NewSubscriptionGroupedWithMeteredMinimumPrice - | Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds - | Orb::NewSubscriptionMatrixWithDisplayNamePrice - | Orb::NewSubscriptionGroupedTieredPackagePrice - | Orb::NewSubscriptionMaxGroupTieredPackagePrice - | Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice - | Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice - | Orb::NewSubscriptionCumulativeGroupedBulkPrice - | Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation - | Orb::NewSubscriptionMinimumCompositePrice - | Orb::SubscriptionCreateParams::ReplacePrice::Price::Percent - | Orb::SubscriptionCreateParams::ReplacePrice::Price::EventOutput + attr_accessor cell_coordinates: String - module Price - extend Orb::Internal::Type::Union + attr_accessor threshold_amount: String - type bulk_with_filters = + attr_accessor description: String? + + def initialize: ( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + ?description: String? + ) -> void + + def to_hash: -> { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + end + end + end + + type tiered_with_proration = { - bulk_with_filters_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::cadence, + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::cadence, item_id: String, - model_type: :bulk_with_filters, + model_type: :tiered_with_proration, name: String, + tiered_with_proration_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::conversion_rate_config?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1486,17 +2499,17 @@ module Orb reference_id: String? } - class BulkWithFilters < Orb::Internal::Type::BaseModel - attr_accessor bulk_with_filters_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig - - attr_accessor cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::cadence + class TieredWithProration < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::cadence attr_accessor item_id: String - attr_accessor model_type: :bulk_with_filters + attr_accessor model_type: :tiered_with_proration attr_accessor name: String + attr_accessor tiered_with_proration_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig + attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -1505,7 +2518,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config? attr_accessor currency: String? @@ -1526,15 +2539,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - bulk_with_filters_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::cadence, + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::cadence, item_id: String, name: String, + tiered_with_proration_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -1544,20 +2557,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :bulk_with_filters + ?model_type: :tiered_with_proration ) -> void def to_hash: -> { - bulk_with_filters_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::cadence, + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::cadence, item_id: String, - model_type: :bulk_with_filters, + model_type: :tiered_with_proration, name: String, + tiered_with_proration_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::conversion_rate_config?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1569,60 +2582,168 @@ module Orb reference_id: String? } - type bulk_with_filters_config = + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::cadence] + end + + type tiered_with_proration_config = { - filters: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] + tiers: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] } - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - attr_accessor filters: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter] - - attr_accessor tiers: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + attr_accessor tiers: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] def initialize: ( - filters: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] + tiers: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] ) -> void def to_hash: -> { - filters: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] + tiers: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] } - type filter = { property_key: String, property_value: String } + type tier = { tier_lower_bound: String, unit_amount: String } - class Filter < Orb::Internal::Type::BaseModel - attr_accessor property_key: String + class Tier < Orb::Internal::Type::BaseModel + attr_accessor tier_lower_bound: String - attr_accessor property_value: String + attr_accessor unit_amount: String def initialize: ( - property_key: String, - property_value: String + tier_lower_bound: String, + unit_amount: String ) -> void - def to_hash: -> { property_key: String, property_value: String } + def to_hash: -> { + tier_lower_bound: String, + unit_amount: String + } end + end + end - type tier = { unit_amount: String, tier_lower_bound: String? } + type grouped_with_min_max_thresholds = + { + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence, + grouped_with_min_max_thresholds_config: Orb::SubscriptionCreateParams::ReplacePrice::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::SubscriptionCreateParams::ReplacePrice::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 Tier < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence - attr_accessor tier_lower_bound: String? + attr_accessor grouped_with_min_max_thresholds_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - def initialize: ( - unit_amount: String, - ?tier_lower_bound: String? - ) -> void + 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::SubscriptionCreateParams::ReplacePrice::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::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence, + grouped_with_min_max_thresholds_config: Orb::SubscriptionCreateParams::ReplacePrice::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::SubscriptionCreateParams::ReplacePrice::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: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end + def to_hash: -> { + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence, + grouped_with_min_max_thresholds_config: Orb::SubscriptionCreateParams::ReplacePrice::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::SubscriptionCreateParams::ReplacePrice::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 @@ -1642,22 +2763,54 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::BulkWithFilters::cadence] + def self?.values: -> ::Array[Orb::Models::SubscriptionCreateParams::ReplacePrice::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 tiered_with_proration = + type cumulative_grouped_allocation = { - cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::cadence, + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - model_type: :tiered_with_proration, + model_type: :cumulative_grouped_allocation, name: String, - tiered_with_proration_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1669,17 +2822,17 @@ module Orb reference_id: String? } - class TieredWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::cadence + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence + + attr_accessor cumulative_grouped_allocation_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig attr_accessor item_id: String - attr_accessor model_type: :tiered_with_proration + attr_accessor model_type: :cumulative_grouped_allocation attr_accessor name: String - attr_accessor tiered_with_proration_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig - attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -1688,7 +2841,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config? attr_accessor currency: String? @@ -1709,15 +2862,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::cadence, + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, name: String, - tiered_with_proration_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -1727,20 +2880,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :tiered_with_proration + ?model_type: :cumulative_grouped_allocation ) -> void def to_hash: -> { - cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::cadence, + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - model_type: :tiered_with_proration, + model_type: :cumulative_grouped_allocation, name: String, - tiered_with_proration_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1770,57 +2923,54 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::cadence] + def self?.values: -> ::Array[Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence] end - type tiered_with_proration_config = + type cumulative_grouped_allocation_config = { - tiers: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + 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: ( - tiers: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String ) -> void def to_hash: -> { - tiers: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - 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 daily_credit_allowance = { - cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, - model_type: :grouped_with_min_max_thresholds, + model_type: :daily_credit_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1832,14 +2982,14 @@ module Orb reference_id: String? } - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::cadence - attr_accessor grouped_with_min_max_thresholds_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + attr_accessor daily_credit_allowance_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig attr_accessor item_id: String - attr_accessor model_type: :grouped_with_min_max_thresholds + attr_accessor model_type: :daily_credit_allowance attr_accessor name: String @@ -1851,7 +3001,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config? attr_accessor currency: String? @@ -1872,15 +3022,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, name: String, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -1890,20 +3040,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :grouped_with_min_max_thresholds + ?model_type: :daily_credit_allowance ) -> void def to_hash: -> { - cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, - model_type: :grouped_with_min_max_thresholds, + model_type: :daily_credit_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1933,54 +3083,78 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence] + def self?.values: -> ::Array[Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::cadence] end - type grouped_with_min_max_thresholds_config = + type daily_credit_allowance_config = { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] } - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String - attr_accessor maximum_charge: String + attr_accessor default_unit_amount: String - attr_accessor minimum_charge: String + attr_accessor dimensions: ::Array[String?] - attr_accessor per_unit_rate: String + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] def initialize: ( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] ) -> void def to_hash: -> { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionCreateParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end end end - type cumulative_grouped_allocation = + type metered_allowance = { - cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::cadence, item_id: String, - model_type: :cumulative_grouped_allocation, + metered_allowance_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1992,14 +3166,14 @@ module Orb reference_id: String? } - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence - - attr_accessor cumulative_grouped_allocation_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::cadence attr_accessor item_id: String - attr_accessor model_type: :cumulative_grouped_allocation + attr_accessor metered_allowance_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig + + attr_accessor model_type: :metered_allowance attr_accessor name: String @@ -2011,7 +3185,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config? attr_accessor currency: String? @@ -2032,15 +3206,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::cadence, item_id: String, + metered_allowance_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, name: String, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -2050,20 +3224,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :cumulative_grouped_allocation + ?model_type: :metered_allowance ) -> void def to_hash: -> { - cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + cadence: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::cadence, item_id: String, - model_type: :cumulative_grouped_allocation, + metered_allowance_config: Orb::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, + conversion_rate_config: Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -2093,38 +3267,52 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence] + def self?.values: -> ::Array[Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::MeteredAllowance::cadence] end - type cumulative_grouped_allocation_config = + type metered_allowance_config = { - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor cumulative_allocation: String + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String - attr_accessor group_allocation: String + attr_accessor consumption_grouping_value: String attr_accessor grouping_key: String attr_accessor unit_amount: String + attr_reader allowance_display_name: String? + + def allowance_display_name=: (String) -> String + + attr_reader consumption_display_name: String? + + def consumption_display_name=: (String) -> String + def initialize: ( - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String ) -> void def to_hash: -> { - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } end end diff --git a/sig/orb/models/subscription_price_intervals_params.rbs b/sig/orb/models/subscription_price_intervals_params.rbs index 00813619..f9dcf630 100644 --- a/sig/orb/models/subscription_price_intervals_params.rbs +++ b/sig/orb/models/subscription_price_intervals_params.rbs @@ -253,6 +253,7 @@ module Orb | Orb::NewFloatingPackageWithAllocationPrice | Orb::NewFloatingUnitWithPercentPrice | Orb::NewFloatingMatrixWithAllocationPrice + | Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts | Orb::NewFloatingTieredWithProrationPrice | Orb::NewFloatingUnitWithProrationPrice | Orb::NewFloatingGroupedAllocationPrice @@ -267,6 +268,8 @@ module Orb | Orb::NewFloatingScalableMatrixWithTieredPricingPrice | Orb::NewFloatingCumulativeGroupedBulkPrice | Orb::SubscriptionPriceIntervalsParams::Add::Price::CumulativeGroupedAllocation + | Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance + | Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance | Orb::NewFloatingMinimumCompositePrice | Orb::SubscriptionPriceIntervalsParams::Add::Price::Percent | Orb::SubscriptionPriceIntervalsParams::Add::Price::EventOutput @@ -452,6 +455,234 @@ module Orb end end + type matrix_with_threshold_discounts = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::cadence, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor matrix_with_threshold_discounts_config: Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + + attr_accessor model_type: :matrix_with_threshold_discounts + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::conversion_rate_config? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::cadence, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?model_type: :matrix_with_threshold_discounts + ) -> void + + def to_hash: -> { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::cadence, + currency: String, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::cadence] + end + + type matrix_with_threshold_discounts_config = + { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor first_dimension: String + + attr_accessor matrix_values: ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] + + attr_accessor second_dimension: String? + + attr_reader threshold_discount_groups: ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup]? + + def threshold_discount_groups=: ( + ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + + def initialize: ( + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + ?second_dimension: String?, + ?threshold_discount_groups: ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> void + + def to_hash: -> { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + type matrix_value = + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor first_dimension_value: String + + attr_accessor unit_amount: String + + attr_accessor second_dimension_value: String? + + def initialize: ( + first_dimension_value: String, + unit_amount: String, + ?second_dimension_value: String? + ) -> void + + def to_hash: -> { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + end + + type threshold_discount_group = + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + attr_accessor above_threshold_discount_percentage: String + + attr_accessor below_threshold_discount_percentage: String + + attr_accessor cell_coordinates: String + + attr_accessor threshold_amount: String + + attr_accessor description: String? + + def initialize: ( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + ?description: String? + ) -> void + + def to_hash: -> { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + end + end + end + type grouped_with_min_max_thresholds = { cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::GroupedWithMinMaxThresholds::cadence, @@ -762,6 +993,354 @@ module Orb end end + type daily_credit_allowance = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::cadence, + currency: String, + daily_credit_allowance_config: Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::cadence + + attr_accessor currency: String + + attr_accessor daily_credit_allowance_config: Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig + + attr_accessor item_id: String + + attr_accessor model_type: :daily_credit_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::conversion_rate_config? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::cadence, + currency: String, + daily_credit_allowance_config: Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::conversion_rate_config?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?model_type: :daily_credit_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::cadence, + currency: String, + daily_credit_allowance_config: Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + item_id: String, + model_type: :daily_credit_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::cadence] + end + + type daily_credit_allowance_config = + { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String + + attr_accessor default_unit_amount: String + + attr_accessor dimensions: ::Array[String?] + + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + + def initialize: ( + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + ) -> void + + def to_hash: -> { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionPriceIntervalsParams::Add::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end + end + end + + type metered_allowance = + { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::cadence, + currency: String, + item_id: String, + metered_allowance_config: Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::cadence + + attr_accessor currency: String + + attr_accessor item_id: String + + attr_accessor metered_allowance_config: Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig + + attr_accessor model_type: :metered_allowance + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::conversion_rate_config? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::cadence, + currency: String, + item_id: String, + metered_allowance_config: Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::conversion_rate_config?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?model_type: :metered_allowance + ) -> void + + def to_hash: -> { + cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::cadence, + currency: String, + item_id: String, + metered_allowance_config: Orb::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::conversion_rate_config?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::MeteredAllowance::cadence] + end + + type metered_allowance_config = + { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String + + attr_accessor consumption_grouping_value: String + + attr_accessor grouping_key: String + + attr_accessor unit_amount: String + + attr_reader allowance_display_name: String? + + def allowance_display_name=: (String) -> String + + attr_reader consumption_display_name: String? + + def consumption_display_name=: (String) -> String + + def initialize: ( + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String + ) -> void + + def to_hash: -> { + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String + } + end + end + type percent = { cadence: Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::Percent::cadence, diff --git a/sig/orb/models/subscription_schedule_plan_change_params.rbs b/sig/orb/models/subscription_schedule_plan_change_params.rbs index 875f59db..01cdf447 100644 --- a/sig/orb/models/subscription_schedule_plan_change_params.rbs +++ b/sig/orb/models/subscription_schedule_plan_change_params.rbs @@ -291,6 +291,7 @@ module Orb | Orb::NewSubscriptionPackageWithAllocationPrice | Orb::NewSubscriptionUnitWithPercentPrice | Orb::NewSubscriptionMatrixWithAllocationPrice + | Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts | Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration | Orb::NewSubscriptionUnitWithProrationPrice | Orb::NewSubscriptionGroupedAllocationPrice @@ -305,6 +306,8 @@ module Orb | Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice | Orb::NewSubscriptionCumulativeGroupedBulkPrice | Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation + | Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance + | Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance | Orb::NewSubscriptionMinimumCompositePrice | Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent | Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput @@ -495,6 +498,239 @@ module Orb end end + type matrix_with_threshold_discounts = + { + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence + + attr_accessor item_id: String + + attr_accessor matrix_with_threshold_discounts_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + + attr_accessor model_type: :matrix_with_threshold_discounts + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :matrix_with_threshold_discounts + ) -> void + + def to_hash: -> { + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::cadence] + end + + type matrix_with_threshold_discounts_config = + { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor first_dimension: String + + attr_accessor matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] + + attr_accessor second_dimension: String? + + attr_reader threshold_discount_groups: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup]? + + def threshold_discount_groups=: ( + ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + + def initialize: ( + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + ?second_dimension: String?, + ?threshold_discount_groups: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> void + + def to_hash: -> { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + type matrix_value = + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor first_dimension_value: String + + attr_accessor unit_amount: String + + attr_accessor second_dimension_value: String? + + def initialize: ( + first_dimension_value: String, + unit_amount: String, + ?second_dimension_value: String? + ) -> void + + def to_hash: -> { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + end + + type threshold_discount_group = + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + attr_accessor above_threshold_discount_percentage: String + + attr_accessor below_threshold_discount_percentage: String + + attr_accessor cell_coordinates: String + + attr_accessor threshold_amount: String + + attr_accessor description: String? + + def initialize: ( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + ?description: String? + ) -> void + + def to_hash: -> { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + end + end + end + type tiered_with_proration = { cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::cadence, @@ -978,18 +1214,18 @@ module Orb end end - type percent = + type daily_credit_allowance = { - cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::cadence, + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, - model_type: :percent, + model_type: :daily_credit_allowance, name: String, - percent_config: Orb::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::conversion_rate_config?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1001,17 +1237,17 @@ module Orb reference_id: String? } - class Percent < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::cadence + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::cadence + + attr_accessor daily_credit_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig attr_accessor item_id: String - attr_accessor model_type: :percent + attr_accessor model_type: :daily_credit_allowance attr_accessor name: String - attr_accessor percent_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig - attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -1020,7 +1256,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config? attr_accessor currency: String? @@ -1041,15 +1277,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::cadence, + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, name: String, - percent_config: Orb::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -1059,20 +1295,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :percent + ?model_type: :daily_credit_allowance ) -> void def to_hash: -> { - cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::cadence, + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, - model_type: :percent, + model_type: :daily_credit_allowance, name: String, - percent_config: Orb::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::conversion_rate_config?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1102,32 +1338,78 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::cadence] + def self?.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::cadence] end - type percent_config = { percent: Float } + type daily_credit_allowance_config = + { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } - class PercentConfig < Orb::Internal::Type::BaseModel - attr_accessor percent: Float + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String - def initialize: (percent: Float) -> void + attr_accessor default_unit_amount: String - def to_hash: -> { percent: Float } + attr_accessor dimensions: ::Array[String?] + + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + + def initialize: ( + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + ) -> void + + def to_hash: -> { + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] + } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end end end - type event_output = + type metered_allowance = { - cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::cadence, - event_output_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig, + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::cadence, item_id: String, - model_type: :event_output, + metered_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::conversion_rate_config?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1139,14 +1421,14 @@ module Orb reference_id: String? } - class EventOutput < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::cadence - - attr_accessor event_output_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::cadence attr_accessor item_id: String - attr_accessor model_type: :event_output + attr_accessor metered_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig + + attr_accessor model_type: :metered_allowance attr_accessor name: String @@ -1158,7 +1440,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::conversion_rate_config? attr_accessor currency: String? @@ -1179,15 +1461,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::cadence, - event_output_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig, + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::cadence, item_id: String, + metered_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, name: String, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -1197,20 +1479,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :event_output + ?model_type: :metered_allowance ) -> void def to_hash: -> { - cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::cadence, - event_output_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig, + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::cadence, item_id: String, - model_type: :event_output, + metered_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::conversion_rate_config?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1240,223 +1522,954 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::cadence] + def self?.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::cadence] end - type event_output_config = + type metered_allowance_config = { - unit_rating_key: String, - default_unit_rate: String?, - grouping_key: String? + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } - class EventOutputConfig < Orb::Internal::Type::BaseModel - attr_accessor unit_rating_key: String + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String - attr_accessor default_unit_rate: String? + attr_accessor consumption_grouping_value: String - attr_accessor grouping_key: String? + attr_accessor grouping_key: String + + attr_accessor unit_amount: String + + attr_reader allowance_display_name: String? + + def allowance_display_name=: (String) -> String + + attr_reader consumption_display_name: String? + + def consumption_display_name=: (String) -> String def initialize: ( - unit_rating_key: String, - ?default_unit_rate: String?, - ?grouping_key: String? + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String ) -> void def to_hash: -> { - unit_rating_key: String, - default_unit_rate: String?, - grouping_key: String? + allowance_grouping_value: String, + consumption_grouping_value: String, + grouping_key: String, + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } end end - def self?.variants: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::price] - end - end - - type billing_cycle_alignment = - :unchanged | :plan_change_date | :start_of_month - + type percent = + { + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::cadence, + item_id: String, + model_type: :percent, + name: String, + percent_config: Orb::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::cadence + + attr_accessor item_id: String + + attr_accessor model_type: :percent + + attr_accessor name: String + + attr_accessor percent_config: Orb::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::cadence, + item_id: String, + name: String, + percent_config: Orb::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::cadence, + item_id: String, + model_type: :percent, + name: String, + percent_config: Orb::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::cadence, + event_output_config: Orb::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::cadence + + attr_accessor event_output_config: Orb::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::cadence, + event_output_config: Orb::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::cadence, + event_output_config: Orb::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::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::SubscriptionSchedulePlanChangeParams::AddPrice::price] + end + end + + type billing_cycle_alignment = + :unchanged | :plan_change_date | :start_of_month + module BillingCycleAlignment extend Orb::Internal::Type::Enum - UNCHANGED: :unchanged - PLAN_CHANGE_DATE: :plan_change_date - START_OF_MONTH: :start_of_month + UNCHANGED: :unchanged + PLAN_CHANGE_DATE: :plan_change_date + START_OF_MONTH: :start_of_month + + def self?.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::billing_cycle_alignment] + end + + type remove_adjustment = { adjustment_id: String } + + class RemoveAdjustment < Orb::Internal::Type::BaseModel + attr_accessor adjustment_id: String + + def initialize: (adjustment_id: String) -> void + + def to_hash: -> { adjustment_id: String } + end + + type remove_price = { external_price_id: String?, price_id: String? } + + class RemovePrice < Orb::Internal::Type::BaseModel + attr_accessor external_price_id: String? + + attr_accessor price_id: String? + + def initialize: ( + ?external_price_id: String?, + ?price_id: String? + ) -> void + + def to_hash: -> { external_price_id: String?, price_id: String? } + end + + type replace_adjustment = + { + adjustment: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::adjustment, + replaces_adjustment_id: String + } + + class ReplaceAdjustment < Orb::Internal::Type::BaseModel + attr_accessor adjustment: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::adjustment + + attr_accessor replaces_adjustment_id: String + + def initialize: ( + adjustment: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::adjustment, + replaces_adjustment_id: String + ) -> void + + def to_hash: -> { + adjustment: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::adjustment, + replaces_adjustment_id: String + } + + 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::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::adjustment] + end + end + + type replace_price = + { + replaces_price_id: String, + allocation_price: Orb::NewAllocationPrice?, + discounts: ::Array[Orb::DiscountOverride]?, + external_price_id: String?, + fixed_price_quantity: Float?, + maximum_amount: String?, + metric_parameter_overrides: ::Hash[Symbol, top]?, + minimum_amount: String?, + price: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::price?, + price_id: String? + } + + class ReplacePrice < Orb::Internal::Type::BaseModel + attr_accessor replaces_price_id: String + + attr_accessor allocation_price: Orb::NewAllocationPrice? + + attr_accessor discounts: ::Array[Orb::DiscountOverride]? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor maximum_amount: String? + + attr_accessor metric_parameter_overrides: ::Hash[Symbol, top]? + + attr_accessor minimum_amount: String? + + attr_accessor price: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::price? + + attr_accessor price_id: String? + + def initialize: ( + replaces_price_id: String, + ?allocation_price: Orb::NewAllocationPrice?, + ?discounts: ::Array[Orb::DiscountOverride]?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?maximum_amount: String?, + ?metric_parameter_overrides: ::Hash[Symbol, top]?, + ?minimum_amount: String?, + ?price: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::price?, + ?price_id: String? + ) -> void + + def to_hash: -> { + replaces_price_id: String, + allocation_price: Orb::NewAllocationPrice?, + discounts: ::Array[Orb::DiscountOverride]?, + external_price_id: String?, + fixed_price_quantity: Float?, + maximum_amount: String?, + metric_parameter_overrides: ::Hash[Symbol, top]?, + minimum_amount: String?, + price: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::price?, + price_id: String? + } + + type price = + Orb::NewSubscriptionUnitPrice + | Orb::NewSubscriptionTieredPrice + | Orb::NewSubscriptionBulkPrice + | Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters + | Orb::NewSubscriptionPackagePrice + | Orb::NewSubscriptionMatrixPrice + | Orb::NewSubscriptionThresholdTotalAmountPrice + | Orb::NewSubscriptionTieredPackagePrice + | Orb::NewSubscriptionTieredWithMinimumPrice + | Orb::NewSubscriptionGroupedTieredPrice + | Orb::NewSubscriptionTieredPackageWithMinimumPrice + | Orb::NewSubscriptionPackageWithAllocationPrice + | Orb::NewSubscriptionUnitWithPercentPrice + | Orb::NewSubscriptionMatrixWithAllocationPrice + | Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts + | Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration + | Orb::NewSubscriptionUnitWithProrationPrice + | Orb::NewSubscriptionGroupedAllocationPrice + | Orb::NewSubscriptionBulkWithProrationPrice + | Orb::NewSubscriptionGroupedWithProratedMinimumPrice + | Orb::NewSubscriptionGroupedWithMeteredMinimumPrice + | Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds + | Orb::NewSubscriptionMatrixWithDisplayNamePrice + | Orb::NewSubscriptionGroupedTieredPackagePrice + | Orb::NewSubscriptionMaxGroupTieredPackagePrice + | Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice + | Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice + | Orb::NewSubscriptionCumulativeGroupedBulkPrice + | Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation + | Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance + | Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance + | Orb::NewSubscriptionMinimumCompositePrice + | Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent + | Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput + + module Price + extend Orb::Internal::Type::Union + + type bulk_with_filters = + { + bulk_with_filters_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::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::SubscriptionSchedulePlanChangeParams::ReplacePrice::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::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig + + attr_accessor cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::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::SubscriptionSchedulePlanChangeParams::ReplacePrice::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::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::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::SubscriptionSchedulePlanChangeParams::ReplacePrice::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::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::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::SubscriptionSchedulePlanChangeParams::ReplacePrice::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? + } - def self?.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::billing_cycle_alignment] - end + type bulk_with_filters_config = + { + filters: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], + tiers: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] + } - type remove_adjustment = { adjustment_id: String } + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + attr_accessor filters: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter] - class RemoveAdjustment < Orb::Internal::Type::BaseModel - attr_accessor adjustment_id: String + attr_accessor tiers: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] - def initialize: (adjustment_id: String) -> void + def initialize: ( + filters: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], + tiers: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] + ) -> void - def to_hash: -> { adjustment_id: String } - end + def to_hash: -> { + filters: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], + tiers: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] + } - type remove_price = { external_price_id: String?, price_id: String? } + type filter = { property_key: String, property_value: String } - class RemovePrice < Orb::Internal::Type::BaseModel - attr_accessor external_price_id: String? + class Filter < Orb::Internal::Type::BaseModel + attr_accessor property_key: String - attr_accessor price_id: String? + attr_accessor property_value: String - def initialize: ( - ?external_price_id: String?, - ?price_id: String? - ) -> void + def initialize: ( + property_key: String, + property_value: String + ) -> void - def to_hash: -> { external_price_id: String?, price_id: String? } - end + def to_hash: -> { property_key: String, property_value: String } + end - type replace_adjustment = - { - adjustment: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::adjustment, - replaces_adjustment_id: String - } + type tier = { unit_amount: String, tier_lower_bound: String? } - class ReplaceAdjustment < Orb::Internal::Type::BaseModel - attr_accessor adjustment: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::adjustment + class Tier < Orb::Internal::Type::BaseModel + attr_accessor unit_amount: String - attr_accessor replaces_adjustment_id: String + attr_accessor tier_lower_bound: String? - def initialize: ( - adjustment: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::adjustment, - replaces_adjustment_id: String - ) -> void + def initialize: ( + unit_amount: String, + ?tier_lower_bound: String? + ) -> void - def to_hash: -> { - adjustment: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::adjustment, - replaces_adjustment_id: String - } + def to_hash: -> { + unit_amount: String, + tier_lower_bound: String? + } + end + end - type adjustment = - Orb::NewPercentageDiscount - | Orb::NewUsageDiscount - | Orb::NewAmountDiscount - | Orb::NewMinimum - | Orb::NewMaximum + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom - module Adjustment - extend Orb::Internal::Type::Union + module Cadence + extend Orb::Internal::Type::Enum - def self?.variants: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::adjustment] - end - end + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom - type replace_price = - { - replaces_price_id: String, - allocation_price: Orb::NewAllocationPrice?, - discounts: ::Array[Orb::DiscountOverride]?, - external_price_id: String?, - fixed_price_quantity: Float?, - maximum_amount: String?, - metric_parameter_overrides: ::Hash[Symbol, top]?, - minimum_amount: String?, - price: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::price?, - price_id: String? - } + def self?.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::cadence] + end + end + + type matrix_with_threshold_discounts = + { + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence + + attr_accessor item_id: String + + attr_accessor matrix_with_threshold_discounts_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig + + attr_accessor model_type: :matrix_with_threshold_discounts + + attr_accessor name: String + + attr_accessor billable_metric_id: String? + + attr_accessor billed_in_advance: bool? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config? + + attr_accessor currency: String? + + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? + + attr_accessor external_price_id: String? + + attr_accessor fixed_price_quantity: Float? + + attr_accessor invoice_grouping_key: String? + + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor license_type_id: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + attr_accessor reference_id: String? + + def initialize: ( + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + name: String, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?fixed_price_quantity: Float?, + ?invoice_grouping_key: String?, + ?invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?license_type_id: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?reference_id: String?, + ?model_type: :matrix_with_threshold_discounts + ) -> void + + def to_hash: -> { + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence, + item_id: String, + matrix_with_threshold_discounts_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + model_type: :matrix_with_threshold_discounts, + name: String, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::conversion_rate_config?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + fixed_price_quantity: Float?, + invoice_grouping_key: String?, + invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + license_type_id: String?, + metadata: ::Hash[Symbol, String?]?, + reference_id: String? + } + + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::cadence] + end + + type matrix_with_threshold_discounts_config = + { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } + + class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel + attr_accessor default_unit_amount: String + + attr_accessor first_dimension: String + + attr_accessor matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue] + + attr_accessor second_dimension: String? + + attr_reader threshold_discount_groups: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup]? - class ReplacePrice < Orb::Internal::Type::BaseModel - attr_accessor replaces_price_id: String + def threshold_discount_groups=: ( + ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] - attr_accessor allocation_price: Orb::NewAllocationPrice? + def initialize: ( + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + ?second_dimension: String?, + ?threshold_discount_groups: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + ) -> void - attr_accessor discounts: ::Array[Orb::DiscountOverride]? + def to_hash: -> { + default_unit_amount: String, + first_dimension: String, + matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue], + second_dimension: String?, + threshold_discount_groups: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup] + } - attr_accessor external_price_id: String? + type matrix_value = + { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } - attr_accessor fixed_price_quantity: Float? + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor first_dimension_value: String - attr_accessor maximum_amount: String? + attr_accessor unit_amount: String - attr_accessor metric_parameter_overrides: ::Hash[Symbol, top]? + attr_accessor second_dimension_value: String? - attr_accessor minimum_amount: String? + def initialize: ( + first_dimension_value: String, + unit_amount: String, + ?second_dimension_value: String? + ) -> void - attr_accessor price: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::price? + def to_hash: -> { + first_dimension_value: String, + unit_amount: String, + second_dimension_value: String? + } + end - attr_accessor price_id: String? + type threshold_discount_group = + { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } - def initialize: ( - replaces_price_id: String, - ?allocation_price: Orb::NewAllocationPrice?, - ?discounts: ::Array[Orb::DiscountOverride]?, - ?external_price_id: String?, - ?fixed_price_quantity: Float?, - ?maximum_amount: String?, - ?metric_parameter_overrides: ::Hash[Symbol, top]?, - ?minimum_amount: String?, - ?price: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::price?, - ?price_id: String? - ) -> void + class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel + attr_accessor above_threshold_discount_percentage: String - def to_hash: -> { - replaces_price_id: String, - allocation_price: Orb::NewAllocationPrice?, - discounts: ::Array[Orb::DiscountOverride]?, - external_price_id: String?, - fixed_price_quantity: Float?, - maximum_amount: String?, - metric_parameter_overrides: ::Hash[Symbol, top]?, - minimum_amount: String?, - price: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::price?, - price_id: String? - } + attr_accessor below_threshold_discount_percentage: String - type price = - Orb::NewSubscriptionUnitPrice - | Orb::NewSubscriptionTieredPrice - | Orb::NewSubscriptionBulkPrice - | Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters - | Orb::NewSubscriptionPackagePrice - | Orb::NewSubscriptionMatrixPrice - | Orb::NewSubscriptionThresholdTotalAmountPrice - | Orb::NewSubscriptionTieredPackagePrice - | Orb::NewSubscriptionTieredWithMinimumPrice - | Orb::NewSubscriptionGroupedTieredPrice - | Orb::NewSubscriptionTieredPackageWithMinimumPrice - | Orb::NewSubscriptionPackageWithAllocationPrice - | Orb::NewSubscriptionUnitWithPercentPrice - | Orb::NewSubscriptionMatrixWithAllocationPrice - | Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration - | Orb::NewSubscriptionUnitWithProrationPrice - | Orb::NewSubscriptionGroupedAllocationPrice - | Orb::NewSubscriptionBulkWithProrationPrice - | Orb::NewSubscriptionGroupedWithProratedMinimumPrice - | Orb::NewSubscriptionGroupedWithMeteredMinimumPrice - | Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds - | Orb::NewSubscriptionMatrixWithDisplayNamePrice - | Orb::NewSubscriptionGroupedTieredPackagePrice - | Orb::NewSubscriptionMaxGroupTieredPackagePrice - | Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice - | Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice - | Orb::NewSubscriptionCumulativeGroupedBulkPrice - | Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation - | Orb::NewSubscriptionMinimumCompositePrice - | Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent - | Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput + attr_accessor cell_coordinates: String - module Price - extend Orb::Internal::Type::Union + attr_accessor threshold_amount: String - type bulk_with_filters = + attr_accessor description: String? + + def initialize: ( + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + ?description: String? + ) -> void + + def to_hash: -> { + above_threshold_discount_percentage: String, + below_threshold_discount_percentage: String, + cell_coordinates: String, + threshold_amount: String, + description: String? + } + end + end + end + + type tiered_with_proration = { - bulk_with_filters_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::cadence, + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::cadence, item_id: String, - model_type: :bulk_with_filters, + model_type: :tiered_with_proration, name: String, + tiered_with_proration_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::conversion_rate_config?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1468,17 +2481,17 @@ module Orb reference_id: String? } - class BulkWithFilters < Orb::Internal::Type::BaseModel - attr_accessor bulk_with_filters_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig - - attr_accessor cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::cadence + class TieredWithProration < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::cadence attr_accessor item_id: String - attr_accessor model_type: :bulk_with_filters + attr_accessor model_type: :tiered_with_proration attr_accessor name: String + attr_accessor tiered_with_proration_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig + attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -1487,7 +2500,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config? attr_accessor currency: String? @@ -1508,15 +2521,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - bulk_with_filters_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::cadence, + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::cadence, item_id: String, name: String, + tiered_with_proration_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -1526,20 +2539,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :bulk_with_filters + ?model_type: :tiered_with_proration ) -> void def to_hash: -> { - bulk_with_filters_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::cadence, + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::cadence, item_id: String, - model_type: :bulk_with_filters, + model_type: :tiered_with_proration, name: String, + tiered_with_proration_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::conversion_rate_config?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1551,60 +2564,168 @@ module Orb reference_id: String? } - type bulk_with_filters_config = + type cadence = + :annual + | :semi_annual + | :monthly + | :quarterly + | :one_time + | :custom + + module Cadence + extend Orb::Internal::Type::Enum + + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom + + def self?.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::cadence] + end + + type tiered_with_proration_config = { - filters: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] + tiers: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] } - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - attr_accessor filters: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter] - - attr_accessor tiers: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] + class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + attr_accessor tiers: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] def initialize: ( - filters: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] + tiers: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] ) -> void def to_hash: -> { - filters: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] + tiers: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] } - type filter = { property_key: String, property_value: String } + type tier = { tier_lower_bound: String, unit_amount: String } - class Filter < Orb::Internal::Type::BaseModel - attr_accessor property_key: String + class Tier < Orb::Internal::Type::BaseModel + attr_accessor tier_lower_bound: String - attr_accessor property_value: String + attr_accessor unit_amount: String def initialize: ( - property_key: String, - property_value: String + tier_lower_bound: String, + unit_amount: String ) -> void - def to_hash: -> { property_key: String, property_value: String } + def to_hash: -> { + tier_lower_bound: String, + unit_amount: String + } end + end + end - type tier = { unit_amount: String, tier_lower_bound: String? } + type grouped_with_min_max_thresholds = + { + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence, + grouped_with_min_max_thresholds_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::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::SubscriptionSchedulePlanChangeParams::ReplacePrice::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 Tier < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence - attr_accessor tier_lower_bound: String? + attr_accessor grouped_with_min_max_thresholds_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - def initialize: ( - unit_amount: String, - ?tier_lower_bound: String? - ) -> void + 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::SubscriptionSchedulePlanChangeParams::ReplacePrice::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::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence, + grouped_with_min_max_thresholds_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::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::SubscriptionSchedulePlanChangeParams::ReplacePrice::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: -> { - unit_amount: String, - tier_lower_bound: String? - } - end - end + def to_hash: -> { + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence, + grouped_with_min_max_thresholds_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::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::SubscriptionSchedulePlanChangeParams::ReplacePrice::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 @@ -1624,22 +2745,54 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::cadence] + def self?.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::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 tiered_with_proration = + type cumulative_grouped_allocation = { - cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::cadence, + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - model_type: :tiered_with_proration, + model_type: :cumulative_grouped_allocation, name: String, - tiered_with_proration_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1651,17 +2804,17 @@ module Orb reference_id: String? } - class TieredWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::cadence + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence + + attr_accessor cumulative_grouped_allocation_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig attr_accessor item_id: String - attr_accessor model_type: :tiered_with_proration + attr_accessor model_type: :cumulative_grouped_allocation attr_accessor name: String - attr_accessor tiered_with_proration_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig - attr_accessor billable_metric_id: String? attr_accessor billed_in_advance: bool? @@ -1670,7 +2823,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config? attr_accessor currency: String? @@ -1691,15 +2844,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::cadence, + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, name: String, - tiered_with_proration_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -1709,20 +2862,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :tiered_with_proration + ?model_type: :cumulative_grouped_allocation ) -> void def to_hash: -> { - cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::cadence, + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, item_id: String, - model_type: :tiered_with_proration, + model_type: :cumulative_grouped_allocation, name: String, - tiered_with_proration_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::conversion_rate_config?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1752,57 +2905,54 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::cadence] + def self?.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence] end - type tiered_with_proration_config = + type cumulative_grouped_allocation_config = { - tiers: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + 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: ( - tiers: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String ) -> void def to_hash: -> { - tiers: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + cumulative_allocation: String, + group_allocation: String, + grouping_key: String, + unit_amount: String } - - type tier = { tier_lower_bound: String, unit_amount: String } - - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String - - attr_accessor unit_amount: String - - def initialize: ( - 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 daily_credit_allowance = { - cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, - model_type: :grouped_with_min_max_thresholds, + model_type: :daily_credit_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1814,14 +2964,14 @@ module Orb reference_id: String? } - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence + class DailyCreditAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::cadence - attr_accessor grouped_with_min_max_thresholds_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + attr_accessor daily_credit_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig attr_accessor item_id: String - attr_accessor model_type: :grouped_with_min_max_thresholds + attr_accessor model_type: :daily_credit_allowance attr_accessor name: String @@ -1833,7 +2983,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config? attr_accessor currency: String? @@ -1854,15 +3004,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, name: String, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -1872,20 +3022,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :grouped_with_min_max_thresholds + ?model_type: :daily_credit_allowance ) -> void def to_hash: -> { - cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::cadence, + daily_credit_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, item_id: String, - model_type: :grouped_with_min_max_thresholds, + model_type: :daily_credit_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1915,54 +3065,78 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::cadence] + def self?.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::cadence] end - type grouped_with_min_max_thresholds_config = + type daily_credit_allowance_config = { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] } - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String + class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor daily_allowance: String - attr_accessor maximum_charge: String + attr_accessor default_unit_amount: String - attr_accessor minimum_charge: String + attr_accessor dimensions: ::Array[String?] - attr_accessor per_unit_rate: String + attr_accessor event_day_property: String + + attr_accessor matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] def initialize: ( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] ) -> void def to_hash: -> { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + daily_allowance: String, + default_unit_amount: String, + dimensions: ::Array[String?], + event_day_property: String, + matrix_values: ::Array[Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] } + + type matrix_value = + { dimension_values: ::Array[String?], unit_amount: String } + + class MatrixValue < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[String?] + + attr_accessor unit_amount: String + + def initialize: ( + dimension_values: ::Array[String?], + unit_amount: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[String?], + unit_amount: String + } + end end end - type cumulative_grouped_allocation = + type metered_allowance = { - cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::cadence, item_id: String, - model_type: :cumulative_grouped_allocation, + metered_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1974,14 +3148,14 @@ module Orb reference_id: String? } - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence - - attr_accessor cumulative_grouped_allocation_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + class MeteredAllowance < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::cadence attr_accessor item_id: String - attr_accessor model_type: :cumulative_grouped_allocation + attr_accessor metered_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig + + attr_accessor model_type: :metered_allowance attr_accessor name: String @@ -1993,7 +3167,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config? attr_accessor currency: String? @@ -2014,15 +3188,15 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::cadence, item_id: String, + metered_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, name: String, ?billable_metric_id: String?, ?billed_in_advance: bool?, ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -2032,20 +3206,20 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :cumulative_grouped_allocation + ?model_type: :metered_allowance ) -> void def to_hash: -> { - cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + cadence: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::cadence, item_id: String, - model_type: :cumulative_grouped_allocation, + metered_allowance_config: Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig, + model_type: :metered_allowance, name: String, billable_metric_id: String?, billed_in_advance: bool?, billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, conversion_rate: Float?, - conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::conversion_rate_config?, + conversion_rate_config: Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -2075,38 +3249,52 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::cadence] + def self?.values: -> ::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::cadence] end - type cumulative_grouped_allocation_config = + type metered_allowance_config = { - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - attr_accessor cumulative_allocation: String + class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel + attr_accessor allowance_grouping_value: String - attr_accessor group_allocation: String + attr_accessor consumption_grouping_value: String attr_accessor grouping_key: String attr_accessor unit_amount: String + attr_reader allowance_display_name: String? + + def allowance_display_name=: (String) -> String + + attr_reader consumption_display_name: String? + + def consumption_display_name=: (String) -> String + def initialize: ( - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + ?allowance_display_name: String, + ?consumption_display_name: String ) -> void def to_hash: -> { - cumulative_allocation: String, - group_allocation: String, + allowance_grouping_value: String, + consumption_grouping_value: String, grouping_key: String, - unit_amount: String + unit_amount: String, + allowance_display_name: String, + consumption_display_name: String } end end diff --git a/sig/orb/resources/alerts.rbs b/sig/orb/resources/alerts.rbs index 7f1000be..4551c4f0 100644 --- a/sig/orb/resources/alerts.rbs +++ b/sig/orb/resources/alerts.rbs @@ -47,7 +47,9 @@ module Orb type: Orb::Models::AlertCreateForSubscriptionParams::type_, ?grouping_keys: ::Array[String]?, ?metric_id: String?, + ?price_filters: ::Array[Orb::AlertCreateForSubscriptionParams::PriceFilter]?, ?pricing_unit_id: String?, + ?threshold_overrides: ::Array[Orb::AlertCreateForSubscriptionParams::ThresholdOverride]?, ?request_options: Orb::request_opts ) -> Orb::Alert diff --git a/sig/orb/resources/plans.rbs b/sig/orb/resources/plans.rbs index fb3fcc19..82cf837f 100644 --- a/sig/orb/resources/plans.rbs +++ b/sig/orb/resources/plans.rbs @@ -11,6 +11,7 @@ module Orb prices: ::Array[Orb::PlanCreateParams::Price], ?adjustments: ::Array[Orb::PlanCreateParams::Adjustment]?, ?default_invoice_memo: String?, + ?description: String?, ?external_plan_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?net_terms: Integer?, @@ -21,6 +22,7 @@ module Orb def update: ( String plan_id, + ?description: String?, ?external_plan_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?request_options: Orb::request_opts diff --git a/sig/orb/resources/plans/external_plan_id.rbs b/sig/orb/resources/plans/external_plan_id.rbs index b0bd8d99..4a116e26 100644 --- a/sig/orb/resources/plans/external_plan_id.rbs +++ b/sig/orb/resources/plans/external_plan_id.rbs @@ -4,6 +4,7 @@ module Orb class ExternalPlanID def update: ( String other_external_plan_id, + ?description: String?, ?external_plan_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?request_options: Orb::request_opts diff --git a/test/orb/client_test.rb b/test/orb/client_test.rb index ecdbb306..f153cab9 100644 --- a/test/orb/client_test.rb +++ b/test/orb/client_test.rb @@ -208,8 +208,8 @@ def test_client_redirect_307 assert_equal(recorded.method, _1.method) assert_equal(recorded.body, _1.body) assert_equal( - recorded.headers.transform_keys(&:downcase).fetch("content-type"), - _1.headers.transform_keys(&:downcase).fetch("content-type") + recorded.headers.transform_keys(&:downcase)["content-type"], + _1.headers.transform_keys(&:downcase)["content-type"] ) end end @@ -344,8 +344,9 @@ def test_default_headers orb.customers.create(email: "dev@stainless.com", name: "x") assert_requested(:any, /./) do |req| - headers = req.headers.transform_keys(&:downcase).fetch_values("accept", "content-type") - headers.each { refute_empty(_1) } + headers = req.headers.transform_keys(&:downcase) + expected = req.body.nil? ? ["accept"] : %w[accept content-type] + headers.fetch_values(*expected).each { refute_empty(_1) } end end end diff --git a/test/orb/resources/alerts_test.rb b/test/orb/resources/alerts_test.rb index f473cb4b..45b55da2 100644 --- a/test/orb/resources/alerts_test.rb +++ b/test/orb/resources/alerts_test.rb @@ -24,7 +24,9 @@ def test_retrieve type: Orb::Alert::Type, balance_alert_status: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::BalanceAlertStatus]) | nil, grouping_keys: ^(Orb::Internal::Type::ArrayOf[String]) | nil, - license_type: Orb::Alert::LicenseType | nil + license_type: Orb::Alert::LicenseType | nil, + price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::PriceFilter]) | nil, + threshold_overrides: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::ThresholdOverride]) | nil } end end @@ -50,7 +52,9 @@ def test_update_required_params type: Orb::Alert::Type, balance_alert_status: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::BalanceAlertStatus]) | nil, grouping_keys: ^(Orb::Internal::Type::ArrayOf[String]) | nil, - license_type: Orb::Alert::LicenseType | nil + license_type: Orb::Alert::LicenseType | nil, + price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::PriceFilter]) | nil, + threshold_overrides: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::ThresholdOverride]) | nil } end end @@ -85,7 +89,9 @@ def test_list type: Orb::Alert::Type, balance_alert_status: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::BalanceAlertStatus]) | nil, grouping_keys: ^(Orb::Internal::Type::ArrayOf[String]) | nil, - license_type: Orb::Alert::LicenseType | nil + license_type: Orb::Alert::LicenseType | nil, + price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::PriceFilter]) | nil, + threshold_overrides: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::ThresholdOverride]) | nil } end end @@ -112,7 +118,9 @@ def test_create_for_customer_required_params type: Orb::Alert::Type, balance_alert_status: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::BalanceAlertStatus]) | nil, grouping_keys: ^(Orb::Internal::Type::ArrayOf[String]) | nil, - license_type: Orb::Alert::LicenseType | nil + license_type: Orb::Alert::LicenseType | nil, + price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::PriceFilter]) | nil, + threshold_overrides: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::ThresholdOverride]) | nil } end end @@ -143,7 +151,9 @@ def test_create_for_external_customer_required_params type: Orb::Alert::Type, balance_alert_status: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::BalanceAlertStatus]) | nil, grouping_keys: ^(Orb::Internal::Type::ArrayOf[String]) | nil, - license_type: Orb::Alert::LicenseType | nil + license_type: Orb::Alert::LicenseType | nil, + price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::PriceFilter]) | nil, + threshold_overrides: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::ThresholdOverride]) | nil } end end @@ -170,7 +180,9 @@ def test_create_for_subscription_required_params type: Orb::Alert::Type, balance_alert_status: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::BalanceAlertStatus]) | nil, grouping_keys: ^(Orb::Internal::Type::ArrayOf[String]) | nil, - license_type: Orb::Alert::LicenseType | nil + license_type: Orb::Alert::LicenseType | nil, + price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::PriceFilter]) | nil, + threshold_overrides: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::ThresholdOverride]) | nil } end end @@ -196,7 +208,9 @@ def test_disable type: Orb::Alert::Type, balance_alert_status: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::BalanceAlertStatus]) | nil, grouping_keys: ^(Orb::Internal::Type::ArrayOf[String]) | nil, - license_type: Orb::Alert::LicenseType | nil + license_type: Orb::Alert::LicenseType | nil, + price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::PriceFilter]) | nil, + threshold_overrides: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::ThresholdOverride]) | nil } end end @@ -222,7 +236,9 @@ def test_enable type: Orb::Alert::Type, balance_alert_status: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::BalanceAlertStatus]) | nil, grouping_keys: ^(Orb::Internal::Type::ArrayOf[String]) | nil, - license_type: Orb::Alert::LicenseType | nil + license_type: Orb::Alert::LicenseType | nil, + price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::PriceFilter]) | nil, + threshold_overrides: ^(Orb::Internal::Type::ArrayOf[Orb::Alert::ThresholdOverride]) | nil } end end diff --git a/test/orb/resources/prices/external_price_id_test.rb b/test/orb/resources/prices/external_price_id_test.rb index 19758d1b..b1ff4925 100644 --- a/test/orb/resources/prices/external_price_id_test.rb +++ b/test/orb/resources/prices/external_price_id_test.rb @@ -26,6 +26,7 @@ def test_update in Orb::Price::PackageWithAllocation in Orb::Price::UnitWithPercent in Orb::Price::MatrixWithAllocation + in Orb::Price::MatrixWithThresholdDiscounts in Orb::Price::TieredWithProration in Orb::Price::UnitWithProration in Orb::Price::GroupedAllocation @@ -40,6 +41,8 @@ def test_update in Orb::Price::ScalableMatrixWithTieredPricing in Orb::Price::CumulativeGroupedBulk in Orb::Price::CumulativeGroupedAllocation + in Orb::Price::DailyCreditAllowance + in Orb::Price::MeteredAllowance in Orb::Price::MinimumComposite in Orb::Price::Percent in Orb::Price::EventOutput @@ -496,6 +499,38 @@ def test_update dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::MatrixWithAllocation::LicenseType | nil } + in { + model_type: :matrix_with_threshold_discounts, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::MatrixWithThresholdDiscounts::BillingMode, + cadence: Orb::Price::MatrixWithThresholdDiscounts::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::MatrixWithThresholdDiscounts::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + matrix_with_threshold_discounts_config: Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::MatrixWithThresholdDiscounts::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::MatrixWithThresholdDiscounts::LicenseType | nil + } in { model_type: :tiered_with_proration, id: String, @@ -944,6 +979,70 @@ def test_update dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::CumulativeGroupedAllocation::LicenseType | nil } + in { + model_type: :daily_credit_allowance, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::DailyCreditAllowance::BillingMode, + cadence: Orb::Price::DailyCreditAllowance::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::DailyCreditAllowance::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::DailyCreditAllowance::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + daily_credit_allowance_config: Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::DailyCreditAllowance::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::DailyCreditAllowance::LicenseType | nil + } + in { + model_type: :metered_allowance, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::MeteredAllowance::BillingMode, + cadence: Orb::Price::MeteredAllowance::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::MeteredAllowance::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::MeteredAllowance::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + metered_allowance_config: Orb::Price::MeteredAllowance::MeteredAllowanceConfig, + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::MeteredAllowance::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::MeteredAllowance::LicenseType | nil + } in { model_type: :minimum_composite, id: String, @@ -1067,6 +1166,7 @@ def test_fetch in Orb::Price::PackageWithAllocation in Orb::Price::UnitWithPercent in Orb::Price::MatrixWithAllocation + in Orb::Price::MatrixWithThresholdDiscounts in Orb::Price::TieredWithProration in Orb::Price::UnitWithProration in Orb::Price::GroupedAllocation @@ -1081,6 +1181,8 @@ def test_fetch in Orb::Price::ScalableMatrixWithTieredPricing in Orb::Price::CumulativeGroupedBulk in Orb::Price::CumulativeGroupedAllocation + in Orb::Price::DailyCreditAllowance + in Orb::Price::MeteredAllowance in Orb::Price::MinimumComposite in Orb::Price::Percent in Orb::Price::EventOutput @@ -1537,6 +1639,38 @@ def test_fetch dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::MatrixWithAllocation::LicenseType | nil } + in { + model_type: :matrix_with_threshold_discounts, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::MatrixWithThresholdDiscounts::BillingMode, + cadence: Orb::Price::MatrixWithThresholdDiscounts::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::MatrixWithThresholdDiscounts::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + matrix_with_threshold_discounts_config: Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::MatrixWithThresholdDiscounts::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::MatrixWithThresholdDiscounts::LicenseType | nil + } in { model_type: :tiered_with_proration, id: String, @@ -1985,6 +2119,70 @@ def test_fetch dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::CumulativeGroupedAllocation::LicenseType | nil } + in { + model_type: :daily_credit_allowance, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::DailyCreditAllowance::BillingMode, + cadence: Orb::Price::DailyCreditAllowance::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::DailyCreditAllowance::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::DailyCreditAllowance::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + daily_credit_allowance_config: Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::DailyCreditAllowance::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::DailyCreditAllowance::LicenseType | nil + } + in { + model_type: :metered_allowance, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::MeteredAllowance::BillingMode, + cadence: Orb::Price::MeteredAllowance::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::MeteredAllowance::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::MeteredAllowance::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + metered_allowance_config: Orb::Price::MeteredAllowance::MeteredAllowanceConfig, + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::MeteredAllowance::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::MeteredAllowance::LicenseType | nil + } in { model_type: :minimum_composite, id: String, diff --git a/test/orb/resources/prices_test.rb b/test/orb/resources/prices_test.rb index 403af6c7..ba8d7abf 100644 --- a/test/orb/resources/prices_test.rb +++ b/test/orb/resources/prices_test.rb @@ -36,6 +36,7 @@ def test_create_required_params in Orb::Price::PackageWithAllocation in Orb::Price::UnitWithPercent in Orb::Price::MatrixWithAllocation + in Orb::Price::MatrixWithThresholdDiscounts in Orb::Price::TieredWithProration in Orb::Price::UnitWithProration in Orb::Price::GroupedAllocation @@ -50,6 +51,8 @@ def test_create_required_params in Orb::Price::ScalableMatrixWithTieredPricing in Orb::Price::CumulativeGroupedBulk in Orb::Price::CumulativeGroupedAllocation + in Orb::Price::DailyCreditAllowance + in Orb::Price::MeteredAllowance in Orb::Price::MinimumComposite in Orb::Price::Percent in Orb::Price::EventOutput @@ -506,6 +509,38 @@ def test_create_required_params dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::MatrixWithAllocation::LicenseType | nil } + in { + model_type: :matrix_with_threshold_discounts, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::MatrixWithThresholdDiscounts::BillingMode, + cadence: Orb::Price::MatrixWithThresholdDiscounts::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::MatrixWithThresholdDiscounts::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + matrix_with_threshold_discounts_config: Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::MatrixWithThresholdDiscounts::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::MatrixWithThresholdDiscounts::LicenseType | nil + } in { model_type: :tiered_with_proration, id: String, @@ -954,6 +989,70 @@ def test_create_required_params dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::CumulativeGroupedAllocation::LicenseType | nil } + in { + model_type: :daily_credit_allowance, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::DailyCreditAllowance::BillingMode, + cadence: Orb::Price::DailyCreditAllowance::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::DailyCreditAllowance::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::DailyCreditAllowance::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + daily_credit_allowance_config: Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::DailyCreditAllowance::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::DailyCreditAllowance::LicenseType | nil + } + in { + model_type: :metered_allowance, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::MeteredAllowance::BillingMode, + cadence: Orb::Price::MeteredAllowance::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::MeteredAllowance::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::MeteredAllowance::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + metered_allowance_config: Orb::Price::MeteredAllowance::MeteredAllowanceConfig, + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::MeteredAllowance::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::MeteredAllowance::LicenseType | nil + } in { model_type: :minimum_composite, id: String, @@ -1077,6 +1176,7 @@ def test_update in Orb::Price::PackageWithAllocation in Orb::Price::UnitWithPercent in Orb::Price::MatrixWithAllocation + in Orb::Price::MatrixWithThresholdDiscounts in Orb::Price::TieredWithProration in Orb::Price::UnitWithProration in Orb::Price::GroupedAllocation @@ -1091,6 +1191,8 @@ def test_update in Orb::Price::ScalableMatrixWithTieredPricing in Orb::Price::CumulativeGroupedBulk in Orb::Price::CumulativeGroupedAllocation + in Orb::Price::DailyCreditAllowance + in Orb::Price::MeteredAllowance in Orb::Price::MinimumComposite in Orb::Price::Percent in Orb::Price::EventOutput @@ -1547,6 +1649,38 @@ def test_update dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::MatrixWithAllocation::LicenseType | nil } + in { + model_type: :matrix_with_threshold_discounts, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::MatrixWithThresholdDiscounts::BillingMode, + cadence: Orb::Price::MatrixWithThresholdDiscounts::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::MatrixWithThresholdDiscounts::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + matrix_with_threshold_discounts_config: Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::MatrixWithThresholdDiscounts::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::MatrixWithThresholdDiscounts::LicenseType | nil + } in { model_type: :tiered_with_proration, id: String, @@ -1995,6 +2129,70 @@ def test_update dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::CumulativeGroupedAllocation::LicenseType | nil } + in { + model_type: :daily_credit_allowance, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::DailyCreditAllowance::BillingMode, + cadence: Orb::Price::DailyCreditAllowance::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::DailyCreditAllowance::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::DailyCreditAllowance::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + daily_credit_allowance_config: Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::DailyCreditAllowance::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::DailyCreditAllowance::LicenseType | nil + } + in { + model_type: :metered_allowance, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::MeteredAllowance::BillingMode, + cadence: Orb::Price::MeteredAllowance::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::MeteredAllowance::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::MeteredAllowance::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + metered_allowance_config: Orb::Price::MeteredAllowance::MeteredAllowanceConfig, + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::MeteredAllowance::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::MeteredAllowance::LicenseType | nil + } in { model_type: :minimum_composite, id: String, @@ -2125,6 +2323,7 @@ def test_list in Orb::Price::PackageWithAllocation in Orb::Price::UnitWithPercent in Orb::Price::MatrixWithAllocation + in Orb::Price::MatrixWithThresholdDiscounts in Orb::Price::TieredWithProration in Orb::Price::UnitWithProration in Orb::Price::GroupedAllocation @@ -2139,6 +2338,8 @@ def test_list in Orb::Price::ScalableMatrixWithTieredPricing in Orb::Price::CumulativeGroupedBulk in Orb::Price::CumulativeGroupedAllocation + in Orb::Price::DailyCreditAllowance + in Orb::Price::MeteredAllowance in Orb::Price::MinimumComposite in Orb::Price::Percent in Orb::Price::EventOutput @@ -2595,6 +2796,38 @@ def test_list dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::MatrixWithAllocation::LicenseType | nil } + in { + model_type: :matrix_with_threshold_discounts, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::MatrixWithThresholdDiscounts::BillingMode, + cadence: Orb::Price::MatrixWithThresholdDiscounts::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::MatrixWithThresholdDiscounts::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + matrix_with_threshold_discounts_config: Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::MatrixWithThresholdDiscounts::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::MatrixWithThresholdDiscounts::LicenseType | nil + } in { model_type: :tiered_with_proration, id: String, @@ -3043,6 +3276,70 @@ def test_list dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::CumulativeGroupedAllocation::LicenseType | nil } + in { + model_type: :daily_credit_allowance, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::DailyCreditAllowance::BillingMode, + cadence: Orb::Price::DailyCreditAllowance::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::DailyCreditAllowance::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::DailyCreditAllowance::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + daily_credit_allowance_config: Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::DailyCreditAllowance::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::DailyCreditAllowance::LicenseType | nil + } + in { + model_type: :metered_allowance, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::MeteredAllowance::BillingMode, + cadence: Orb::Price::MeteredAllowance::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::MeteredAllowance::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::MeteredAllowance::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + metered_allowance_config: Orb::Price::MeteredAllowance::MeteredAllowanceConfig, + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::MeteredAllowance::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::MeteredAllowance::LicenseType | nil + } in { model_type: :minimum_composite, id: String, @@ -3221,6 +3518,7 @@ def test_fetch in Orb::Price::PackageWithAllocation in Orb::Price::UnitWithPercent in Orb::Price::MatrixWithAllocation + in Orb::Price::MatrixWithThresholdDiscounts in Orb::Price::TieredWithProration in Orb::Price::UnitWithProration in Orb::Price::GroupedAllocation @@ -3235,6 +3533,8 @@ def test_fetch in Orb::Price::ScalableMatrixWithTieredPricing in Orb::Price::CumulativeGroupedBulk in Orb::Price::CumulativeGroupedAllocation + in Orb::Price::DailyCreditAllowance + in Orb::Price::MeteredAllowance in Orb::Price::MinimumComposite in Orb::Price::Percent in Orb::Price::EventOutput @@ -3691,6 +3991,38 @@ def test_fetch dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::MatrixWithAllocation::LicenseType | nil } + in { + model_type: :matrix_with_threshold_discounts, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::MatrixWithThresholdDiscounts::BillingMode, + cadence: Orb::Price::MatrixWithThresholdDiscounts::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::MatrixWithThresholdDiscounts::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::MatrixWithThresholdDiscounts::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + matrix_with_threshold_discounts_config: Orb::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::MatrixWithThresholdDiscounts::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::MatrixWithThresholdDiscounts::LicenseType | nil + } in { model_type: :tiered_with_proration, id: String, @@ -4139,6 +4471,70 @@ def test_fetch dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, license_type: Orb::Price::CumulativeGroupedAllocation::LicenseType | nil } + in { + model_type: :daily_credit_allowance, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::DailyCreditAllowance::BillingMode, + cadence: Orb::Price::DailyCreditAllowance::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::DailyCreditAllowance::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::DailyCreditAllowance::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + daily_credit_allowance_config: Orb::Price::DailyCreditAllowance::DailyCreditAllowanceConfig, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::DailyCreditAllowance::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::DailyCreditAllowance::LicenseType | nil + } + in { + model_type: :metered_allowance, + id: String, + billable_metric: Orb::BillableMetricTiny | nil, + billing_cycle_configuration: Orb::BillingCycleConfiguration, + billing_mode: Orb::Price::MeteredAllowance::BillingMode, + cadence: Orb::Price::MeteredAllowance::Cadence, + composite_price_filters: ^(Orb::Internal::Type::ArrayOf[Orb::Price::MeteredAllowance::CompositePriceFilter]) | nil, + conversion_rate: Float | nil, + conversion_rate_config: Orb::Price::MeteredAllowance::ConversionRateConfig | nil, + created_at: Time, + credit_allocation: Orb::Allocation | nil, + currency: String, + discount: Orb::Discount | nil, + external_price_id: String | nil, + fixed_price_quantity: Float | nil, + invoice_grouping_key: String | nil, + invoicing_cycle_configuration: Orb::BillingCycleConfiguration | nil, + item: Orb::ItemSlim, + maximum: Orb::Maximum | nil, + maximum_amount: String | nil, + metadata: ^(Orb::Internal::Type::HashOf[String]), + metered_allowance_config: Orb::Price::MeteredAllowance::MeteredAllowanceConfig, + minimum: Orb::Minimum | nil, + minimum_amount: String | nil, + name: String, + plan_phase_order: Integer | nil, + price_type: Orb::Price::MeteredAllowance::PriceType, + replaces_price_id: String | nil, + dimensional_price_configuration: Orb::DimensionalPriceConfiguration | nil, + license_type: Orb::Price::MeteredAllowance::LicenseType | nil + } in { model_type: :minimum_composite, id: String,